Uploading image to facebook page - facebook

Is it possible to upload image using the graph api or other method to facebook page ?
example appreciated

Of course it is possible. Look in Facebook.cpp for an example:
https://github.com/eamocanu/Facebook.Qt.APIs/blob/master/APIs/Facebook.cpp
method: uploadPhoto(..)
The entire API is hosted at https://github.com/eamocanu/Facebook.Qt.APIs
You can also download it from https://github.com/eamocanu/Facebook.Qt.APIs/downloads

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

Posting an image to foursquare by URL?

Looking through the Foursquare documentation I found the Photo Add section.
In APIs for other social platforms I have been able to post an image by its source url, e.g.: https://www.google.com/images/srpr/logo3w.png (e.g. this is possible on Facebook & Tumblr)
The documentation is a little unclear about the capabilities of the post* developer preview argument.
Is it possible to "upload" an image by its source url to Foursquare?
(otherwise can I get this added to the feature request queue?!)
It is not currently possible to upload an image by url. You will need to upload the image data with your photos/add request.

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.

How to customize(have multiple images) in feed post dialog

I've seen an example where feed post had multiple images. How can I make the same thing? There is only parameter for the image in API.
Customized feed post
it was possible a while ago via some of the old api, but it is now deprecated
You can still call old api calls with oauth and Graph API-like calls
All you have to do is make the request to: https://api.facebook.com/method/stream.publish?access_token=YOUR_TOKEN&_arguments_for_stream_publish_
Here is the documentation: http://developers.facebook.com/docs/reference/rest/stream.publish/
You just have to put more than 1 image as attachment

How to get a facebook profile picture under https?

Is it possible to get an facebook profile picture under https using the new Graph API?
We run a site under https, but the profile picture returned by the facebook Graph API is always served as http (when using https://graph.facebook.com/XXX/picture, the request is redirects to http:// ...). The result is the dreaded mixed-content message.
Anybody know of a workaround?
Here is the fix:
you need to the parameter: return_ssl_resources=true
example:
https://graph.facebook.com/FB_UID/picture?return_ssl_resources=true
Use link 1 to get a high resolution image, link 2 to get an icon sized image where 'xxxx' refer to 'facebook_user_id'.
link 1 :
https://graph.facebook.com/xxxx/picture?type=large
link 2 :
https://graph.facebook.com/xxxx/picture?type=small
The Graph API is essentially a very basic API, it's probably not the most efficient method to grab images. A better alternative is to learn how to uSe "FQL" and create a FQL that grabs all the UID's profile pictures. This way, instead of hundred and hundreds of calls, which can be very slow, you grab all the info you need in one call.