简体   繁体   中英

How to Publish stream using pyfacebook?

HI,

Can anyone tell me how to publish a story or a news feed on a user profile using pyfacebook, i have used

fbml = "<fb:wide><fb:subtitle>This is the subtitle</fb:subtitle>"
fbml += "<fb:if-is-own-profile>This is your profile.<fb:else>This is not your profile.</fb:else></fb:if-is-own-profile></fb:wide>"

request.facebook.profile.setFBML(fbml, request.facebook.uid)

return request.facebook.redirect(request.facebook.get_url('profile', id=request.facebook.uid))

and also: (i found it on some forum)

request.facebook.profile.setFBML(fbml, request.facebook.uid, '', '', '', fbml)

return request.facebook.redirect(request.facebook.get_url('profile', id=request.facebook.uid))

it take me to profile page, but doesn't display anything there

I am stuck.... please help me

profile.setFBML is for the box that either appears on the user's wall sidebar or boxes tab (this is going away entirely in the very near future too BTW).

what you want is stream.publish .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM