开发者

Facebook Graph API - Post Link to App

开发者 https://www.devze.com 2023-03-23 11:32 出处:网络
I\'ve found a quite strange behavior if I try to post to a user wall (feed) using the graph API (tested with Python and JavaScript SDK):

I've found a quite strange behavior if I try to post to a user wall (feed) using the graph API (tested with Python and JavaScript SDK):

If I include a valid facebook internal link including GET parameters (i.e. link to an app) the API fails with a HTTP status 500. If I use any other external link (with GET parameters) or an invalid facebook link or a facebook link without GET paramters, everythings works fine.

You can try this in the Graph API Explorer:

POST: https://graph.facebook.com/me/feed

Non-working Fields:

  • caption: 'test'
  • message: 'test'
  • link: http://www.facebook.com/pages/Lorem-Ipsum/159165434150059?sk=app_227540913924543

Working Fields (invalid sk parameter):

  • caption: 'test'
  • message: 'test'
  • link: http://www.facebook.com/pages/Lorem-Ipsum/159165434150059?sk=app_666

Any ideas? Or a suggestion how to post a link to a facebook app (i.e. http://www.facebook.com/pages/Lorem-开发者_StackOverflowIpsum/159165434150059?sk=app_227540913924543)


Instead of the sk parameter use the v parameter eg:

http://www.facebook.com/pages/Lorem-Ipsum/159165434150059?v=app_227540913924543


Not sure about posting a link, but when uploading a photo, you cannot post a photo with a link from facebook domain. You must use an external resource.

0

精彩评论

暂无评论...
验证码 换一张
取 消