开发者

Post a link to an event using facebook API

I feel like I've tried everything, but I'm not getting anywhere with stream.publish. I would like to post to the "links" section o开发者_如何学Pythonf an event. The application and the logged in user are both admins of the event. I am able to write on the event's wall like so (examples in python using pyFacebook):

facebook.stream.publish(
    message = 'test',
    target_id = XXXXXXXXXXXXXX,
)

and I can post a link to a user's wall like so:

facebook.stream.publish(
    attachment = {
    ...
    },
    uid = XXXXXXXXXXXX
)

but I cannot post a link to an event's wall. Specifying the event eid as the uid in stream.publish gives an error "The user hasn't authorized the application to perform this action", and specifying the event eid as the target_id only allows me to post to the wall as listed above. Is there any way to post a link to an event?


Don't you want to use Action Links to accomplish what you want? You would post an action, with the link that is attached to the action. This might be your way around your current problem.

Stream Publish Action Links


Look at this thread if it can help you. According to it, your user has to be listed as developper from some settings.


Did you set the correct permissions?


Maybe "The user hasn't authorized the application to perform this action" - the user must "like" the application first.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜