Ajax 板


LINE

我想要将我网页中canvas做出来的图分享到FB,所以先将canvas base64後传到imgur再用 imgur的连结让他分享到FB中。而权限的部分我只有拿publish_actoin跟public_profile 但是每次shareToFB()的时後,他总会出现红红的字...而且好像非管理员连用都不能用.. 请问大家有解吗? 网站:http://ototot.github.io/ToS_Card/ 这是部分缩减过的code: function shareToFB () { FB.getLoginStatus(function(response) { if (response.status === 'connected') { //已登入且和app连结 var uid = response.authResponse.accessToken; accessToken = response.authResponse.accessToken; init(); } else if (response.status === 'not_authorized') { //已登入但未与app连结 login(); } else { //未登入 login() } }); } function login() { FB.login(function(response) { if (response.authResponse) { init() }else{ //somethibg } }, { scope: 'public_profile,publish_actions' }); } function init () { var link = "" var imgURL = "" $.ajax({ url: 'https://api.imgur.com/3/image', headers: { 'Authorization': 'Client-ID e51ef6bcc76b94e' }, type: 'POST', data: { 'image': get("output").toDataURL("image/png").replace("data:image/png;base64,","") }, datatype: 'JSON', success: function(req) { imgURL = req.data.link link = req.data.deletehash FB.api('/me/photos', 'post', { access_token: accessToken, message: get("pd").value, url:imgURL }, function(response){ if (!response || response.error) { //Something } else { //something } }); } }); }window.fbAsyncInit = function() { FB.init({ appId: XXXXXXXX, status: true, cookie: true, xfbml: true, oauth: true, version: 'v2.0' } ); } function shareToFB () { FB.getLoginStatus(function(response) { if (response.status === 'connected') { //已登入且和app连结 var uid = response.authResponse.accessToken; accessToken = response.authResponse.accessToken; init(); } else if (response.status === 'not_authorized') { //已登入但未与app连结 login(); } else { //未登入 login() } }); } function login() { FB.login(function(response) { if (response.authResponse) { init() }else{ //somethibg } }, { scope: 'public_profile,publish_actions' }); } function init () { var link = "" var imgURL = "" $.ajax({ url: 'https://api.imgur.com/3/image', headers: { 'Authorization': 'Client-ID e51ef6bcc76b94e' }, type: 'POST', data: { 'image': get("output").toDataURL("image/png").replace("data:image/png;base64,","") }, datatype: 'JSON', success: function(req) { imgURL = req.data.link link = req.data.deletehash FB.api('/me/photos', 'post', { access_token: accessToken, message: get("pd").value, url:imgURL }, function(response){ if (!response || response.error) { //Something } else { //something } }); } }); }window.fbAsyncInit = function() { FB.init({ appId: XXXXXXXX, status: true, cookie: true, xfbml: true, oauth: true, version: 'v2.0' } ); } function shareToFB () { FB.getLoginStatus(function(response) { if (response.status === 'connected') { //已登入且和app连结 var uid = response.authResponse.accessToken; accessToken = response.authResponse.accessToken; init(); } else if (response.status === 'not_authorized') { //已登入但未与app连结 login(); } else { //未登入 login() } }); } function login() { FB.login(function(response) { if (response.authResponse) { init() }else{ //somethibg } }, { scope: 'public_profile,publish_actions' }); } function init () { var link = "" var imgURL = "" $.ajax({ url: 'https://api.imgur.com/3/image', headers: { 'Authorization': 'Client-ID e51ef6bcc76b94e' }, type: 'POST', data: { 'image': get("output").toDataURL("image/png").replace("data:image/png;base64,","") }, datatype: 'JSON', success: function(req) { imgURL = req.data.link link = req.data.deletehash FB.api('/me/photos', 'post', { access_token: accessToken, message: get("pd").value, url:imgURL }, function(response){ if (!response || response.error) { //Something } else { //something } }); } }); } -- 我还没说完呐~~ 够多了够多了,回家啦~!     \ /     ○     ︵ \○╱/|     . . ﹎ ﹍﹍ ╱ ̄﹚╱> (原PO被拖走了....) --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 123.193.74.170
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Ajax/M.1408098728.A.2FF.html
1F:推 qwer820404: 我记得4/30之後的APP 使用额外权限要送审... 08/16 00:19
2F:→ qwer820404: 基本的三个 email public_profile user_friends 08/16 00:20
3F:→ qwer820404: 其他都要在APP的Status&Review下面 去submission 08/16 00:21
嗯哼...送审了,但怎麽不过啊,我已经按照他说的填啦... Please explain how you are using publish_actions to enhance a person's in-app experience: 中文: 这个APP能让使用者简单的做出专属於他们的神魔之塔卡片。而当做完时,可能他们会想要 将卡片跟他的朋友们炫耀,所以我觉得将卡片的图发布到Facebook是个不错的选择。 English: This app is an easy way to let user make their own "Tower of Saviors" card, when they got their own card maybe they'll want to show off to their friends, so I think post the card image to their Facebook is a good way. Please provide step-by-step instructions so our review team can reproduce how you are using publish_actions in your app. 1. Go to http://ototot.github.io/ToS_Card/. 2. Make your own card. 2. Click the "分享至FB" button. 3. Enter what you want to post 4. Click the "分享" button. 5. Accept the "publish_actions" permission. The card is published on your timeline. To add a photo of the card you want to have: 1. Click the middle of card. 2. Select a photo. ※ 编辑: oToToT (123.193.74.170), 08/16/2014 13:32:00
4F:推 hit1205: 审核期要三天,而且他会告诉你结果 @@ (如果失败也会说 08/17 22:07
5F:→ hit1205: 原因 08/17 22:07
6F:→ oToToT: 他有说原因...但说啥我没用到权限 08/18 22:54







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Tech_Job站内搜寻

TOP