看板 Ajax 關於我們 聯絡資訊
不好意思,因剛接觸程式不久,研究好久都測不出來,所以還請各位協助,謝謝。 因網頁需求要可透過FB分享內容,並取得內容顯示在自己畫面上。 想說用fb.ui('feed')得到post_id,再用fb.api('{post_id}')抓內容顯示, 但現在會出現錯誤, Unsupported get request. Please read the Graph API documentation. 不知道要怎樣做才可以透過post_id得到分享的內容呢? 不好意思,附上程式碼,謝謝了。 function showStream(){ FB.ui( { method: 'feed', name: 'Facebook Dialogs', link: 'http://www.google.com', picture: '', caption: '千年之約', description: '賴' }, function(response) { if (response && response.post_id) { get_fb(response.post_id); } } ); } function get_fb(pid){ spid = "/"+pid FB.api( spid, function (response) { if (response) { id = response.id; document.getElementById('userid').innerHTML = response.error.message; } } ); } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.219.179.207 ※ 文章網址: https://www.ptt.cc/bbs/Ajax/M.1422964368.A.AC3.html
MangoTW: 你的FB API怎麼下的? 02/04 03:03
※ 編輯: aditionality (114.44.172.49), 02/04/2015 07:40:41
doomdied: obj-id貼框框內按Get Comments,這類似你要的嗎 ? 02/09 16:56