views:

307

answers:

1

Hi,

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?

A: 

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.

teepark