Facebook Graph User Locations change - php

Recently I've been building an application that uses the Facebook graph API (https://developers.facebook.com/docs/graph-api/reference/user/locations/)
I've recently realised that the locations it has been grabbing both in my application, and in the Graph explorer have been missing lots of locations I have been tagged in.
I use to be able to retrieve over 500 locations (multiple pages) from Facebook, now I'm receiving less than 500 (single page). This is both in my application and in the explorer (https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Flocations%3Flimit%3D500)
If anyone has any ideas that would be great - this is for my final year developmental project at university.

You need to provide the graph api a access token to receive a users locations

I think if you've the following permissions you'll get all the locations of the user-
user_photos
user_status
friend_photos
friend_status
You can check what all permissions your access token is carrying in Debugger.
Reference

Related

How can I download all photos of the current user in the Facebook Graph PHP SDK?

I'm trying to find all photos where the current user is tagged in using the Facebook PHP SDK. When I query $fb->get('/me/photos?type=tagged&limit=10000'), only around 500 photos are present in the list when I'm logged in as me. If I check on the Facebook web page, it says there are over 3000 photos of me. Is it possible to get all photos of the current user?
Hopefully this summary saves some folks time since I spent a few days scratching my head over this. As of Graph API v2.5, your app will not have permission to view photos that other people have uploaded unless the uploader has logged into the app and granted the user_photos permission too. This even applies to photos the current user has been tagged in.
In order for an app to get all photos that you are tagged in through the Graph API, all of your friends who have uploaded photos that you are tagged in would have to grant permission to the app.
To quote Facebook support:
After checking, this should be the case. Each Facebook user is in
control of what data is accessible to an application. If you have that
user grant the user_photos (and possibly user_posts if it's the
container for the photo) to the application, you should be able to
fetch that photo.
Source: Facebook API Bug Report
Yes, it's possible, but not with just one call. You'll have to use pagination, as outlined in
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#paging
In this case, the paging.next property in the JSON response contain the link/call to get the next results. I'd recommend to set the limit to 50 or 100 maximum,

Using the Facebook php SDK to retrieve photos and about info

I was just getting into the testing of the SDK for the Facebook app development using PHP. I understand the basic set up to get started, but I'm not sure how to pull album photos so I can display them throughout my page when the user logs in. Is this documented in the development section on Facebook or is there some kind of guide i can look over?
I'm able to display names but I'd also like an array of photos from the libraries and the users' information like work. I've tried searching for specifics to get this implemented but I'm not hitting any documentation on it.
but I'm not sure how to pull album photos so I can display them throughout my page when the user logs in.
Take a look at this awesome tool- Graph API Explorer
Also, you should read about the Permissions. By taking the different permissions from your user, you can fetch the related data of the user. You can test the same using the Graph API Explorer- just click on Get Access Token to set the different permissions.
For eg, if you want to fetch the user's photo, ask for the permission (while login, using scope parameter)- user_photos and simply call:
/me/photos
Live Demo
users' information like work
permissions: user_work_history
call : me/?fields=work
Live Demo

Facebook API - Access Token Delivers Inconsistent Information

In Facebook's API, the Graph Explorer(https://developers.facebook.com/tools/explorer) provides data on requested queries using Facebooks graph structure. When choosing the three fields,"ID, name, posts", the explorer returns all of the users posts of the user's wall, filtering out any activity the user has done anywhere else. It is strictly what is on the user's wall.
The problem here is that whenever I make a new application and test the applications data results using the Graph API explorer I always get similar, but extra information. The extra information is what's included in the user's, "Recent Activity", feed.
In the graph explorer if you look at the top there is a choice for an application, you can switch to the application you've made. Then when requesting an access token, you can select the, "read_stream", permission which allows an application to read a user's stream data i.e wall, news feed, etc.
The GET requests made by the Graph API Explorer application deliver different results then a custom made app using face book's developer API.
I've tried to locate the problems within the access tokens, but I've had no luck.
The access token is calculated based on the permissions you request.
Every time you change the permissions you are asking for, the access token will change.
I'm almost sure that Facebook Debugging App requests for some permissions you are not requesting, therefore you will not be able to replicate the results you get with their app in yours.

Take the likes from users of my app and file them into csv

I need to be able to consolidate all the likes from users that use my Facebook app into an Excel or .csv file. I can have the user authenticate within my Facebook app, but is there a way to see the likes for all users of an app using Open Graph or some other Facebook tool? I'm certain that someone else must have had this problem, and I'm hoping that one of you can help me out!
I've been trying to run FQL queries to bring up likes, but don't have any experience with PHP so it has been miserable so far. Any ideas?
There's no way to retrieve a list of users of your app - you'll need to manually build that as users authorise the app see this question for more information
Assuming you have permission to access a user's likes connection - access /USER_ID/likes and parse the response, saving it to a file in accordance with whatever language you're using's syntax (google is your friend here)
Note that your use of the data is subject to Facebook's policies and user's consent in accordance with your privacy policy and sharing it with third parties may be illegal (i am not a lawyer, this is not official advice, etc etc)
Here is the problem with that the application type does not have a like connection. Application Object GraphAPI This is inconvenient when you are looking to gather data on the users that like it.
OR were you talking about the likes endpoint of the user object? That you can gather but I dont think it is what you are looking for. It is shown here Graph Explorer Example - user's likes

Why is the Facebook Access Log showing more than it should?

I'm using the server-side SDK to access Facebook Authentication.
After authorizing my app - even with the included example.php, I can go to App Privacy in settings then click on the app, then See Details in the Last data access section
And the dialog shows:
My App accessed the following information on your behalf:
Basic Information - Today
Likes, Music, TV, Movies, Books, Quotes, About Me, Hometown, Current City, Education History and Work History - Today
My Friends' Current Cities - Today
All I really need from the authentication is the userid and possibly name... I don't care about any other personal info. And yet even the example.php which is really basic seems to be requesting a lot.
Is there another way to authenticate without Facebook thinking I pulled all this data? I don't want users to be concerned about excessive data pulling when I'm not even pulling it.
The Stack Exchange authentication does not have this issue. It might be an issue in the PHP SDK?
The additional entries in the app access log are created for requests to the /me-object without a fields-parameter. So instead of accessing /me?access_token=xxx use /me?fields=id,name,...&access_token=...
Please note that the access log is not deleted when you remove an application. This may be quite confusing during testing because you will see old entries.

Categories