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

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

Related

Getting image and text from facebook post

Is there any possibility to extract/get the image and description from Facebook post in code?
Let say we have a public post
https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/10154095214621676/?type=3&theater
Do we able to extract/get the image and description(Get the new dance remixes ...) of that particular post by using Facebook sdk in code?
thanks in advance
Yes, it's possible. You can access the Graph API through a GET request and the photo ID (in your case it's 10154095214621676). As long as the photo originates from a public page you can call for different parameters like name (that's the description), picture (small image), etc.
You can play around with the Graph API Explorer to figure out what exactly you need. For a more detailed information on the possible parameters you might want to have a look into the Facebook Developers Documentation. There you can also find some examples how to handle requests in different SDKs.
Agreed with trotta.
Something like this https://developers.facebook.com/tools/explorer/145634995501895?method=GET&path=10154095214621676%3Ffields%3Dpicture%2Cname%2Calbum%2Cimages&version=v2.9
and you can get all info for the post.

How to make a comment in facebook with attached picture

In facebook site you able to make a comment and attach image to it. Is it possible to do the same things with facebook api?
I have read this facebook for dev link and there is no answer to my question.
If you read the documentation properly, it says-
message is the only parameter in this API call. It should be a string containing the comment text.
So, using the API you can just comment a message to the object using-
POST /{object-id}/comments?
message='This is my message'
, no link/picture could be attached alongwith.
I don't know if it is a recent change in the way Facebook handles this, but if I put the complete url in the comment, Facebook detects it as an image and shows it there (along with the url).
Maybe it's not the cleanest way, but it's a way.

How to post a Recent Activity on Facebook?

Is it possible to post an activity on facebook? I was thinking of something like this
"Has Posted A Photo <MyWebSite URL Here>" Is it possible? if so how? I've tried looking at the docs but I could not find any.
Yes, it is possible by integrating Open Graph into your application. You would need to create custom Objects and Actions as there is no such Common objects, for photo, available as of now in Open Graph.
You can also look into creating custom stories as per your requirements.
Update
Java third party library that you can use :- Spring Social
You can utilize its method post() to Publish action to /{user-id}/{namespace}:{action-type-name} with the required parameters to create the story.

RSS format for events from facebook page

I was successfully able to get the RSS feed of a page in FB using this URL.
https://facebook.com/feeds/page.php?id=PAGE_ID_HERE&format=rss20
It returns values in RSS format. Then using regular NSXMLParser methods or some so parsing protocols, I was able to parse them.But unfortunately it returns all the details of the page, such as Events, notes and etc.
I would like to get the events only. It is stated here, we can achieve it using Graph API once we obtain the general access token. My question is, can't we simply get the RSS feed for events in facebook page like the URL above? Please advise. Thank you.
It looks like the FB API and all RESTful methods of accessing data from Facebook are being retired in favour of the Graph API and FQL, whichever you prefer.
The Graph API way is to parse the JSON returned by:
https://graph.facebook.com/PAGE_ID/events?access_token=TOKEN_HERE
After skim-reading the FQL docs, I can't find a way to do it using that. So, it looks like your best hope lies with the Graph API.
I would really like to know how to do this. We have a facebook page and have a livestream from this page on our website. Now we would like to have a list of events from the facebook page in the website as well. Is it posible at all?

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.