开发者

pyfacebook stream.publish not publishing all details

Trying to publish a stream to facebook using py facebook. The stream publishes a single attachment perfectly i.e media or name or href , e.t.c

But when it comes to appending all the attachments in one line it breaks down and just publishes the message.

attachment = [media,description] etc does not work.

message = "Test Message with Picture"
    media = {'media':[
             {'type': 'image',
              'src':  'http://www.topnews.in/usa/files/megan-fox.jpg', 
              'href': 'http://www.topnews.in/usa/files/megan-fox.jpg'}, 
             {'type': 'image',
              'src':  'http://www.topnews.in/usa/files/megan-fox.jpg', 
              'href': 'http://ihasahotdog.com/upcoming/?pid=20869'}]}
    name = {'name':'testing'}
    href = {'href':'http://google.com'}
    caption =  '开发者_如何转开发caption' :'caption goes here'
    description = { 'description':'Description Goes Here'}

    attachment = media

The second problem is the popup box while publishing in this manner. Python does not show a popup box, it directly publishes to the stream. How can one put a pop up box?


You haven't really given enough information to know what is causing the first issue (the only code you pasted doesn't include the pyfacebook call and has a syntax error from indentation).

about the second issue, python and pyfacebook can deal with facebook's server api only. If you want a popup displayed to your user then you have to do that with javascript - details are here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜