how to get music.listens data using FQL - facebook

I want to integrate spotify data to my application which is posted in Facebook.
I am tried that using Graph API Explorer by https://developers.facebook.com/tools/explorer?method=GET&path=me%2Fmusic.listens.
In order to get the brief information about individual music it takes too long time..
So can anyone help to continue this functionality in FQL..
Regards
Rajapandi

AFAIK you can't do this using FQL.
You need to use the Graph API and have the user_actions.music and friends_actions.music permissions.
Then you can do - graph.facebook.com/USER_ID/music.listens?access_token=

Related

Instagram Insight Metrics with Facebook Graph API

I am trying to use the Facebook Graph API to GET Instagram metrics such as post impressions. I was able to successfully pull my Instagram Follow Count by using this query
{instagram_user_id}?fields=follow_count
When I try to query my post impressions with
{instagram-media-id}/insights?fields=post_impressions
nothing shows up. Am I missing something or have I possibly not requested the correct permissions?
I am trying to follow the documentation at the below link. Is it even possible to pull the impressions through the Facebook Graph API?
https://developers.facebook.com/docs/graph-api/reference/instagram-media/insights/
Thanks!
I believe that it wasn't possible to pull insights using the older version of the API.
However now it is possible as instagram / facebook just released a new version of their Graph API that includes insights. The request would be:
v2.10/{instagram_media_id}/insights?metric=impressions
The new documentation can be found here
Have you tried to specify "period" parameter? By default it might not be a "lifetime" and if you did not generate any impression recently you will see nothing (empty array i assume). In case you missing some permissions, Facebook will make you aware in response.

Viewing Shares information for a Facebook post using Facebook graph API

Im trying to use the Facebook graph api on rails to find for a specific post who shared it. Looking through the documentation and the api data it doesn't seem that this information is available for a specific post. I am able to get the likes and comments information, however not the shares.
Would anyone know whether the current Facebook Api gives that information? Thanks
Using Graph API, do a request to graph.facebook.com/POST_ID?fields=sharedposts.
Iterate through the resulting array to get the sharers' identity.
Example in Python here.

Facebook API retrieve "All activity"

I'm looking for a way to retrieve the equivalent of what's shown on https://www.facebook.com/me/allactivity. Both FQL & Open Graph are fine.
On the graph, /me/feed shows something similar, but it's missing likes, and tags and other things.
Any ideas are appreciated.
This is currently not possible. There is no endpoint to get to this data.
The only available data will be anything that appears as a post (e.g. Youtube, Twitter). For this you can query stream via FQL. You can also try endpoints /music.listens and /video.watches but they will retrive data for the current application not all.

list all facebook friend requests

Is there a way to list all friendship requests using the facebook graph API? I didn't find anything in the docs, but with the experience I've undergone concerning the quality of this doc so far, I wouldn't be surprised if there was a way to it.
I think it's not possible using only Graph API. You will need to use any SDK and then make a FQL query.
Here you go:
http://developers.facebook.com/docs/reference/fql/friend_request/

Facebook: Is there a way to check that I have certain permissions?

I started developing a Facebook app using the new Graph API.
I want to check if I have certain permissions, (say publish_stream for example) for a certain user. I know that the old REST API had users.hasAppPermission, but I don't see anything parallel to that in the new Graph API.
How can I do this?
You will need to run FQL on permissions table. If you are using JS SDK you can run it with FB.Data.query().
Yes. In the new Graph API use "/[user]/permissions". See also detailed explanation here and here.