I'm experiencing some inconsistent behaviour when trying to read achievements from my app. I have 3 tests accounts, 2 of which I can read achievements. However the 3rd account always returns an empty array. All 3 accounts have the publish_action permission and I've tried using both the user and app access_token. Here's the query:
https://graph.facebook.com/{uid}/achievements?access_token={app_access_token}
or
https://graph.facebook.com/{uid}/achievements?access_token={user_access_token}
Now I know the 3rd account has achievements as I get an error when I try to give it an achievement it already has and the game ticker correctly shows the achievements it has earned.
Make sure the third user has granted "user_activities" extended permissions so that the activities can be read, not just published. You can verify this by calling /me/permissions.
Have you checked the facebook layout regarding achievements in your app? since in my FB account I can roll over my own achievements and I get a full list of the achievements configured with each game and in other acocunt that info is not available. The other distinctive feature is I see my thumbnail picture over the main facebook bar (the blue one next to log in)
Related
I'm in the draft stage of designing a charity site for a friend of mine, and we'd like to be able to display photos of people who donate (they would have the choice of turning their photo on or off).
I'm used to logging people into another app of mine via Facebook, and retrieving their basic data.
What I'm wondering is - since the person viewing the site would be the only one logged into it, is it even possible to display photos of Facebook users who have donated ie can you retrieve a FB user photo if they aren't logged in?
If not, are you allowed, with the user's permission, to store their Facebook photo?
Thanks for your time and help.
Have a look at
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/picture/
It's stating
Because profile pictures are always public on Facebook, this call does not require any access token.
This means as long as you requested the public_profile permission upon Facebook Login, and stored the app-scoped user_id in your database somewhere, you can use this app-scoped user_id to generate the profile picture image sources as follows:
<img src="https://graph.facebook.com/{app_scoped_user_id}/picture?type=large&redirect=true"/>
and replace {app_scoped_user_id} by the real app-scoped user_ids in some kind of loop.
When first time a user logged in through Facebook Graph API APP, whether any auto post will be triggered to others wall on user's behalf regarding new APP first Login?
APP is given permission to read_stream, publish_actions.
That is not allowed and not possible for many obvious reasons:
You are not allowed to autopost, not even on the wall of the authorized user. Every single post has to be approved by the user.
You are not allowed to prefill the message, it must be 100% user generated.
You can´t post to the wall of friends (anymore), that would be spam anyway.
...also, you will not get read_stream approved, but you would not need that permission for posting anyway:
This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.
Source: https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-read_stream
Don´t create spammy Apps. User friends don´t care if the user just started using your App. You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app
I'm currently toying with the Facebook Graph Api and have been able to get some interesting results, I would like to be able to post to one of my Facebook App users pages. They have authenticated the app and confirmed the ability for my app to be able to post on there wall. I know there is the can_post check using FQL, but I haven't seen any information on this using the Graph API. Is there a possible check to make so I can see if I have the ability to post on there wall?
can_post
https://developers.facebook.com/docs/reference/fql/user/
This settings is actually a setting of the timeline:
This setting only affects the viewers of the specific timeline and does not apply to the owner of the timeline.
can_post - bool - Whether or not the viewer can post to the user's Wall
Beyond this settings, by authenticating an application and giving it certain publishing permissions, the application, using it's per-user per-app access token will be able to perform actions on behalf the actual user. Actions will be attributed to the user even though it is the application that initiated and published these stories.
To answer what I assume is your underlying question - your application, given the appropriate permissions, will always be able able to publish a story to the users timeline. The act of giving an application any permissions is the same as allowing the application to act as you and access everything you would be able to access. This includes posting a story to your own timeline (even if no other user would be able to).
I am facebook development newbie and have problems with understanding login flow.
What I want to achieve:
I need access app user's pictures from the album created by the
application (preferably also when users are offline).
I run through facebook samples and stackoverflow questions and what I managed to do is:
I use facebook authentication with user_photos scope as follows:
however the script retrieving list of albums gets an "An active access token must be used to query information about the current user." error.
So I added:
Grant Permissions to Allow access to Photos and Albums
The scope is exactly the same, so I don't understand why after clicking that button retrieving the albums works.
The problem is that after refreshing the page, app recognizes that I'm a user who uses the app, but the albums are not accessible again.
How can I make app to get the permission to access pictures permanently?
I suppose it should be possible to access them also when the user is offline (if the album is public)?
The problem was that script accessing data was loaded faster than the user was verified by facebook. It worked with a button just because clicking a button gave application needed time buffor.
I'm using the following FQL query
'select src,src_big from photo where aid in(select aid from album where owner=' + contactId + ' and type="profile")'
But it works for about 50% of my friends, and the rest - it doesn't.
Its not a permissions problem because the behavior persists per friend, if it works for a friend - it always works for him.
Is this a Facebook thing, where a user can choose to prevent apps from getting his photos?
(like what happens when some friends are missing from /me/friends )
It will be odd, because it doesn't work for too many friends..
I tried the same with the graph API, and the same happens (some users ok, rest are not)
What is this?
Thanks in advance
Take a look at the Profile settings of your account. Do you see the Apps link on the left?
There's on portion there that says "Apps others use"
People on Facebook who can see your info can bring it with them when they use apps. This makes their experience better and more social. Use the settings below to control the categories of information that people can bring with them when they use apps, games and websites.
Bio
My videos
Birthday
My links
Family and relationships
My notes
Interested in
Hometown
Religious and political views
Current city
My website
Education and work
If I'm online
Activities, interests, things I like
My status updates
My app activity
My photos
If you don't want apps and websites to access other categories of information (like your friend list, gender or info you've made public), you can turn off all Platform apps. But remember, you will not be able to use any games or apps yourself.
If your friends have that checked. I believe apps won't be able to get your friends' images through your access_tokens even if you have allowed the "friends_photos" permission enabled for the app that you're using.
I did an experiment and apparently I found that I must get my friend to also access the app to allow the app to access their photos under the "user_photos" permission. only then can I get their photos using my access token with the "friends_photos" permission.
Not sure if this makes sense to you.