I guess there is no answers for my question, but i want try anyway :)
I'm moving my app from the V1 API to the V2. (i'm using the Facebook PHP SDK but this is not important). As the FQL is now deprecated, i want to remove all my previous code that used it.
The last thing i can't perform with the graph API is an old call to the url_like FQL table : i just want to see if the user likes a given URL (which is not a Facebook page) or not.
Is there anyway to do it without FQL ?
Thanks !
There is no way to do this with the Graph API afaik. BUT: Never try to hide Like Buttons because the user liked something already. The user should always be able to unlike at the exact same location where he liked something.
Related
I need to read facebookk timeline and some tutorial says me to read with API Graph and I use:
https://graph.facebook.com/***/posts?access_token=***
but when I use this code I obtain {data[]} . I don' know how I wrong. Anyone can help me?
You question is pretty broad.
Did you use the Facebook API explorer? Found here
Are you sure the token is valid?
I am pretty sure what you are doing wrong is your call above is un-versioned so it will default to v2.0+. Which means you can't query based on user name. Next if you are using a user Id in the middle *** it will return empty because that user hasn't authorized the app that got the token, and/or has decided to hide themselves from open graph calls. You can use a public page ID in that spot to get that page posts.
Give this a try
https://graph.facebook.com/ME/posts?access_token=***
Provided you have a valid token it should work with unversioned calls. I suggest you play with the API explorer linked above.
I've been sarching for hours on FB graph api docs and google but couldn't find a solution. Let me explain my question. Using the FB graph API, we are able to retrieve user's newsfeeds, but how do we retrieve user's newsfeeds that are posted by FB apps, such as game scores/achievements? I know that it's possible to retrieve user's newsfeeds created by a specific app by adding filter=app_[app_id], but is there a way to filter newsfeeds that are created by any apps?
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app. I'm not sure if this assumption is safe and is there a better way to achieve my goal?
P.S. I use php SDK so a php solution is highly appreciated. Solutions using other SDK are also appreciated. I'll try to make a conversion by myself.
Thanks in advance,
Kaze
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app.
Posts in /me/feed that have been made by/using an app should have a property "application" set, which contains the app name, namespace and id – so by just looking for that you should be able to determine if it was posted by an app or manually.
For example, I have http://www.example.com/abc.html.
If I like this page, how can I detect me that have already like this page using facebook php api.
Give me help, please
You can collect who likes your page using the newest facebook sdk. What you would do is a sort of work around using their app interface, which is just a LIKE script for your site, and then call https://graph.facebook.com//subscriptions to record the information via mysql or whatever db you are using. I use this method when collecting facebook invites for random contests I hold.
You can use cookies that must be set in the Like button callback or can use Facebook Connect to check whether a user likes your page but this way requires extra permissions and a created facebook app.
Also there is a ready solution for jquery:
http://codecanyon.net/item/like-2-unlock-for-jquery/2822035
I need to grab the statuses from a Facebook page via PHP to display on the page. I don't want to have people logging in to facebook just for my script to grab the statuses from the page since it is a public page and isn't restricted. I have the Facebook API for PHP in my projects directory but have no idea how to use it to do what I want it to. Could someone give me a code example of how I'd do this? Thanks!
It's really a straight forward task if you follow the documentation. Since /PAGE_ID/feed requires any valid access_token, your app access_token is enough to get the data:
Open the Graph API Explorer (I'm querying coca-cola/feed)
Get an app access_token from the Access Token Tool and use it instead of yours
You're done!
Now that FBML is depricated, does anyone know the best way of returning a list of friends that are also using the same app.
Thanks
From the is-app-user documentation
Please note: We are in the process of deprecating the REST API, and have added
equivalent support to the Graph API for this method. Please use the Graph API
User object and GET /[UID]?fields=installed to check if a user is has TOSed that app.
Also, you already should have the uid of all users of your app, because you have your own state saved, so you could just use that.