Posting to an Open Graph page
I've got a open graph page with a like button, activit开发者_开发技巧y 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?
I 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/
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/
精彩评论