Facebook API share a Facebook Video in post - facebook

I'm trying to post on a users' wall through the Facebook Opengraph API and the PHP SDK.
All is working fine - except the video I'm attempting to include in the post (hosted on Facebook videos) is failing to show up on the wall/timeline of the user being posted to.
I'm setting the URL to the video as the 'source' value in the $attachment data sent to /me/feed. Also setting 'type' to video.
On the wall I get a placeholder thumbnail and the rest of the post as specified.
Any ideas?
Thanks,
Steve

You should be able to link to the video as a link. For other types of shared content, you should check out: https://developers.facebook.com/docs/guides/attachments/. Let me know if this isn't what you were trying to do.

Related

Publishing links using Facebook graph API display feed as attachment on Facebook fan page

I am try to publish link on Facebook fan page using graph API but it displayed as attachment not as normal feed which display thumbnail.
Where as when I try to publish same link on users wall it display properly showing image thumbnail.
Can any one tell me why Facebook graph API work differently.
Feed publish on FB fan page :
Feed on user wall :
Thanks to all, I am finally able to solve this issue, the issue was I am using {page_id}/feed method to publish link for video and image, which displayed as attachment on Facebook fan page.
Solution : {page_id}/links with parameters [link, message, picture]
Pls provide params you include in request to facebook. Maybe providing params as shown in answer to following question helps, i.e. picture?
Posting an embedded video link using the Facebook Graph API

Facebook photo feed

I was using FB api to post photos to my fanpage's news feed (http://www.facebook.com/MyApp/photos_stream), but from some time it stopped posting it to news feed and it just uploaded photos to some album (http://www.facebook.com/MyApp/photos).
This is the api command I was using before and after it was working, nothing has changed on my side.
$result = $facebook->api('/123456789/photos', 'post', $attrs);
So the question is, how to post photos to fanpage wall (timeline) properly and why it stopped working by itself?
Thanks
I had the same problem a few times ago.
In fact it was working but you have to go to your photo folder and accept the uploaded image.
In the album Facebook will show you a panel saying you have to approve those photos.
By doing this Facebook will publish the images on the timeline.
I know this is very annoying but I didn't find a better solution (I think Facebook has added a new security to avoid some abuses).
EDIT:
Look at the Facebook documentation.
You can post photos to a Page's Wall by issuing an HTTP POST request
to PAGE_ID/photos with the publish_stream and manage_pages permissions
and the following parameters.
Make sure you are using those two permissions and that your parameters are correct.

Facebook Feed Dialog with a video already uploaded in facebook

I'm trying to do a Feed Dialog in Facebook with a video already uploaded in Facebook.
First, I tried putting in the 'source' param the URL of the video, extracting it with the json return by Graph Api. However, Facebook doesn´t support their own media URLs in this way.
My intention is to show the same effect when you click in "Share" in any video in you facebook profile, but I don't know how i can refer the video.
I don't find anything in the Facebook's developers documentation.
Try linking to the video page itself, like how you link to YouTube if you want to share a video. Facebook renders the YouTube player in the wall when you do this, so in theory it should do the same when you share a Facebook Video URL.
I've just found the option: "Embed this Video" . In the code that Facebook gives in this option, I can find the URL for the video (www.facebook.com/v/video_id), and this works fine in the feed dialog.
The problem was the URL given in the JSON.
Thanks

Uploading an image to friends' wall using Graph API

I would like to know the Graph API equivalent of the following action :
Go to a friend's profile page, click on "Add Photo" on their wall, then "Upload Photo".
I can upload images to my own wall and to my own albums, and I can also post messages and links to my friends' feed, but I can't figure out how to do this.
Any help would be greatly appreciated.
Thanks.
I was able to do it setting a "target_id" parameter, and uploading the image to "graph.facebook.com/me/photos". Then it does show up exactly as if it had been done the manual way.
The only thing I'm not sure about is if "target_id" is some legacy parameter from the REST API that will become unsupported in the future...
I believe that process adds a photo to one of your albums; then attaches that to a Post on your friend's 'feed' connection
You can find documentation for both of those steps on the developer site:
Upload Photo: https://developers.facebook.com/docs/reference/api/user/#photos
Post on wall: https://developers.facebook.com/docs/reference/api/user/#posts - see the 'object_attachment' parameter here

Iphone Posting on wall with FBConnect

I am using the latest facebook sdk.
Everything works fine even the post on wall feature.
Thing is that the post to wall dialog contains minimal information. Just a textbox and a small label reading "... via app-name".
I have used the sample code snippet which provides things like 'caption' and 'description' but these are NOT shown in the post to wall dialog.
I have seen other apps with captions, descriptions and even a large image attached to the post.
How can I show these objects (caption, description, image etc..) using the facebook sdk ?
Thanks
I don't use the Facebook SDK so I just send POST requests with the necessary values. Similar to this:
Posting on Facebook Tutorial
There's another tutorial on the same blog that does use the SDK:
Posting with the Facebook SDK