Facebook使用Graph API和jQuery提供动态链接 [英] Facebook feed post with action link using Graph API and jQuery
问题描述
我试图通过使用Graph API和jQuery的POST请求,通过action link属性进行发送。该帖子工作正常,没有action链接属性,但不包括行动链接的工作。与JS SDK一起使用时,相同的动作链接属性代码工作正常,但我想直接使用Graph API。动作链接属性是不是可以使用Graph API(只有通过JS SDK)或我做错了?
I'm trying to make a feed post with the action link property via a POST request using the Graph API and jQuery. The post works fine without the action link property but doesn't work when I include the action link. The same action link property code works fine when used with the JS SDK but I want to use it directly with the Graph API. Is the action link property just not available using the Graph API (and only through the JS SDK) or am I doing something wrong?
var graphApiLink = 'https://graph.facebook.com/'+ facebookId +'/feed';
$.post(graphApiLink,{access_token: accessToken, actions: [{'name': 'Action', 'link': 'http://www.example.com'}]},function(resp) {
});
推荐答案
您可能需要在此处查看信息:
http://developers.facebook.com/docs/reference/dialogs/ feed /#graphapicall
You might want to review the information here: http://developers.facebook.com/docs/reference/dialogs/feed/#graphapicall
请记住,根据FB的错误消息,帖子的链接必须指向应用程序的连接或画布网址。
Keep in mind, according to FB's error messages, the post's links must direct to the application's connect or canvas URL.
这篇关于Facebook使用Graph API和jQuery提供动态链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!