Using the Facebook Graph API why is it possible to read a list of videos posted to an event but not a list of photos? - facebook

As far as I can make out from reading the Facebook Graph API documentation for Events -
http://developers.facebook.com/docs/reference/api/event/
...it is possible to get a list (array) of videos that have been added to an event but NOT a list of photos. Why am I not able to get photos belonging to an event? Am I missing something here?
thanks

It's because the current implementation of the Graph API does not have the connection from Page Event to photos. The only "image" connection is the picture connection. This is probably because they haven't got around to expanding their API to handle all cases. The videoes connection is definitely out of the ordinary. It may have been placed in there early on in the development of the Graph API to hand one specific facebook partner's needs.

I can get a list of Photos by issuing a /{eventid}/photos request for an event that was created by my app, some event graph api calls are dependent on the fact that your app created the event. i.e. you can't edit an event that wasn't created with your app. I think for the photos request, you need read_stream, user_events, and maybe friend_events permission..

Related

Azure Logic apps Facebook connector gives empty response

When I try to use the Facebook connector in Azure logic apps I can't seem to get the "Get user timeline" to work.
I know for a fact that the User ID is valid (I checked using this URL: https://www.facebook.com/profile.php?id=). I also know for sure that the user has posts on it's timeline. I also tried multiple user ID's.
When I open the failed request in the Logic app I get this, the response is empty every time.
Is this related to privacy settings? Why doesn't this work?
We should probably retire/remove that operation. It is not possible to retrieve the post from Facebook graph API for another user's timeline. It used to so that is why it is there. Specifically, this post might be helpful: Facebook Graph API {user-id}/feed from others empty
The connector calls the /{user-id}/feed API. You can try out the behavior in the Facebook Graph explorer as well. https://developers.facebook.com/tools/explorer/

Find out whether Facebook page is live streaming

Is possible to find out whether some facebook page is live streaming right now? I was looking at Facebook API and from there it seems to me that it is not possible since /{page_id}/live_videos seems to be working only if you are an admin of the page (or you have been granted the access) since you cannot read live videos of public without page access token.
Yes, you can. This is actually called a WebHook (simultaneous notification of a certain app/user about changes made on the page). To do this you will have to create a Facebook App that will be subscribed to the changes made on a certain page that you want to track.
You can simply do this from the dashboard of the app or through Graph API 2.7(since this version supports live_videos) calling {app-id}/subscriptions and choose any of Page Object Subscriptions, which are available through Facebook API(in your case live_videos).
For this kind of subscriptions your app needs to be whitelisted in order not to spam or re-transmit the information received from a certain page.
To get more information about WebHook implementation please read Facebook API documenation: https://developers.facebook.com/docs/graph-api/webhooks
I know this is quite late already but for those that may stumble on it like I did, Yes it's possible.
As clearly stated in the documentation
Page Live Videos - Facebook API Documentation
You will need to make a GET Request to the endpoint below with the appropriate parameters:
https://graph.facebook.com/v6.0/{page-id}/live_videos
Where page_id is the Facebook Page ID you with to check for active Live Stream
The endpoint also expect broadcast_status whose value for your use case would be LIVE
Note: You will need and app setup on Facebook for developers platform and your query would have to be via the app
Further details can be found in the documentation whose link I provided at the initial part of this answer.
You might be able to get a returned string if there is any, from:
GET /v2.7/{page-id}/live_videos HTTP/1.1
Host: graph.facebook.com
You can read more in: https://developers.facebook.com/docs/graph-api/reference/page/live_videos/

Facebook API 'Events Popular In Your Network'

I am trying to utilise the Facebook Graph API to access the section 'Events Popular In Your Network'. However, I cannot seem to find an endpoint that gives access to these. Is there a possible way to get hold of this information? The section is accessed by clicking 'Events' and scrolling down.
Unfortunately no, there is not an specific endpoint for that.
If you want, you might be able to build something similar using events (events docs). Getting friends events, checking attendees (attending endpoint) and ranking them (popular in this case means more friends attending to the event).
I hope it helps.

Facebook Graph API - How to get everything I have liked?

I am new to the API. I tried /me/likes in the graph explorer, it returns only the pages that I like (rightfully so according to the api reference). However, I'd like to get everything - namely posts, photos, statuses, etc - that I have liked.
Any insight?
I do not believe it is possible to get what you are asking for with the Graph API. A good way to see what query to use to get data is to first look at the website and mobile apps to see if they present the data you want. This is because the website and mobile apps will use the Graph API or FQL to retrieve data when it is available through those sources. So all you would need to do is go to the page that contains data that you want and then using a network traffic capture tool (like Fiddler) you can see what requests are being made to get the data.
It turns out that there is a page on the website that displays all of the objects that a User has Liked. To see this, select "Activity Log" in the drop down on the right-most side of the FB toolbar. Then select "Likes" from the left side column. This view will display the data that you are looking for. Unfortunately, to get this data the app makes a request to:
https://www.facebook.com/123456/allactivity?privacy_source=activity_log&log_filter=likes
Where "123456" is the FB UserId. What is returned is an HTML page and not JSON.
As the answer to this question has pointed out, it will take multiple Graph API AND FQL queries just to retrieve the objects that are in your Activity Log. You would then need to spin through those to determine if it is something you Liked or not.

Check feed/post update from user's wall without calling (pulling) graph api periodically

I know how to use graph api - https://graph.facebook.com/{id}/feed|posts to get user's and page's feed.
I also know that facebook provides an subscription API. But I can not use it to check feeds of users i am interested but not our application users (ex: A super idol I am interested but who is not our application users. I want to check not only posts by him but also messages posted by his fans)
Is there a notification service to notify me (callback) the updating of user's feed, such that I don't need to pull graph api periodically to check the updating?.
Thanks.
"I want to check not only posts by him but also messages posted by his fans" and "but not our application users"
This sounds like a stalker app. http://developers.facebook.com/policy/ Facebook says you are not allowed to do that.