Facebook Phot uploading PHPSDK - facebook

uploading photos to a wall, i can use the items below, I am using the solution on this: Facebook graph API & PHP SDK questions
What I need to know is checking for its location once its uploaded... will that be stored in $fb_foto as shown in the link above...
Cheers
Phil

In that example $fb_foto will contain the photo ID after upload, you can then access it at /{photo id} in the Graph API

Related

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

How can I download a video from Facebook using GraphAPI?

I want to download a video from facebook to the clients local drive. I saw a few browser plugins and Facebook apps that are able to that and I was wondering how it can be done using the GraphAPI or in any other way.
First, you get the Graph API object. If the object is public, it's simple, just get https://graph.facebook.com/10151651550011063. (Where the number is the object's ID, equal to the ?v=OBJECTID in the facebook video URL.)
If the object is not public, you need a valid access_token, and the Graph API url becomes something like https://graph.facebook.com/10151651550011063?access_token=DFSDSGSFDGFGDSblabla
Then, in the Graph API object, you'll find the video download link under source.
Refer Below Link. Might help you
http://developers.facebook.com/docs/reference/api/video/
1/ You can get source video by api but it only in sd quality.
2/ If you need to get source video by api, make sure you know to get accesstoken by this way:
Go to https://m.facebook.com/composer/ocelot/async_loader/?publisher=feed
Search for EAAA... it is your accesstoken.
3/ https://graph.facebook.com/v10.0/(page/group/userid)_videoid?fields=source&access_token=your_accesstoken
example https://graph.facebook.com/v10.0/1389311341281276_2668264723385925?fields=source&access_token=your_accesstoken
finally you can get private video or public video from facebook by graph api
$idPage/feed?fields=message,link,created_time,type,name,id,source
source => will return url mp4 video post
You cannot download videos using api.
You can just get there links,likes,comments etc.

Facebook - syncing comments social plugin with comments on object's?

Currently i am adding the social plugins to my site. Specifically to my photo albums. To generate the albums i am using fql to grab all the albums from a certain page. So it then occurred to me that people will be commenting inside of facebook but the social plugin will only show comments for the url not for the photo's object inside facebook. I know i can get the object_id from the fql. Is there a way to link the two together so if a user comments on either my site or facebook it will be all included.
So i am a little stumped i looked around the graph api for quite some time with no luck so anybody have any ideas? :\
cheers guys
So there isn't currently a plugin that lets you put an Object_id into and it will grab all of the comments out for that object.
You will need to use the graph api and if the album is public then you will not need a oauth code to access the comments. Once you have this object just convert it to a a stand-object array and do what you will with it ;)

Is it possible to download all of my photos on facebook through facebook graph api?

I want to download all of my photos and albums from facebook in a programatic way.
I know its possible to push photos to fb through graph api. I was wondering if it is possible to pull photos as well.
Yes. First you would have to get all the albums:
https://graph.facebook.com/me/albums?access_token=
Then you would have to request the list of photos in each album:
https://graph.facebook.com/album_Id_here/photos?access_token=
The result of the last request will give you a JSON object that contains urls of each photo in the album.
See the documentation here: http://developers.facebook.com/docs/reference/api/

Posting images/emotions to Facebook status

I am trying to post images/emotions to a users status. Here is an app that does it: http://apps.facebook.com/status-emoticon/
I've viewed the JS source and I'm cofused, it seems to be sending some sort of code as a message and facebook is turning that code into an image.
Any ideas?
When you upload an image to FB you have to encode it in the body of your HTTP request. I did something like this recently when messing around with the API, check out this project:
https://github.com/abrady/gappengine/tree/master/fb06_canvas
It is a canvas that lets you grab photos from your friend's albums and upload them into an album of your choice. (in particular, look at the function graph_put_file in fb06_canvas.py)