Facebook API - embed a video in a wall that also has a different link

I am trying to make a wall post using the Facebook API, which has a thumbnail for playing video and a link field. (I use the Python cover for Facebook).

When you create a wall post using the API, you specify your additional content with an attachment field:

graph = GraphAPI(valid_access_token) graph.put_wall_post(message="Hey Everyone", attachment={ "name" : "My Cool Link", "description" : "It very cool", "link" : "http://www.my_app_url.com" } 

I want to add a thumbnail to this video for playback. One way to do this is to put the video in the attachment link field:

 graph.put_wall_post(message="Hey Everyone", attachment={ "name" : "My Cool Video", "description" : "It very cool", "link" : "http://www.youtube.com/watch?v=some_yt_id" } 

This displays a thumbnail of the video and plays on Facebook, and this is what I want, but it uses the link field, so I cannot use this field to link them to www.my_app_url.com. I want to be able to do both.

Does anyone know how I can put a thumbnail for video playback and a link to my application on the wall on Facebook via the Open Graph API?

Additional reference information. There is a way to do this with the picture field in the attachment object - this allows you to add the URL of the picture, which is separate from the main link of the attachment. Facebook docs says that you can put video links in the "source" field in the application, but when I tried, the attachment did not display the thumbnail and it will not play.

+4
source share
1 answer

In the end, I set the link to my application in the message message and used the link field in the message attachment for the video. Not what I was hoping for, but I think it works.

0
source

All Articles