发布到开放图谱页面
我有一个带有点赞按钮的开放图形页面,活动提要等。我希望能够以编程方式发布。 开放图文档表示可以通过旧的stream.publish api实现。我有一个指向我的 facebook 应用程序的元标记,但流发布 api 似乎无法发布。
这就是我通过 api 发布的内容:
{
message='Hello facebook',
target_id='ID via curl 'https://graph.facebook.com/?ids',
'uid'='application_id'
}
我不断收到:
"error_code":101,"error_msg":"Invalid API key"
我错过了什么?
I've got a open graph page with a like button, activity feed, etc. I want to be able to post programmatically. The open graph docs says it's possible via the old stream.publish api. I've got a meta tag pointing to my facebook application, but the stream publish api doesn't seem to be able to post.
This is what i'm posting via the api:
{
message='Hello facebook',
target_id='ID via curl 'https://graph.facebook.com/?ids',
'uid'='application_id'
}
I keep getting:
"error_code":101,"error_msg":"Invalid API key"
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了我的问题。确保您拥有 app_id 元标记,并且 uid 应为社交节点 ID。所以从
https://graph.facebook.com/?ids=http://website/
传回的 idI figured out my problem. Make sure you've got the app_id meta tag and the uid should be the social nodes id. So the id that's passed back from
https://graph.facebook.com/?ids=http://website/
如果您想以编程方式执行操作,带有应用程序 ID 的元标记不会执行任何操作。您需要使用 javascript 库并使用您的应用程序 ID 对其进行初始化。
http://developers.facebook.com/docs/reference/javascript/
A meta tag with your application ID isn't going to do anything if you want to perform actions programmatically. You need to use the javascript libs and initialize them with your application ID.
http://developers.facebook.com/docs/reference/javascript/