I just would like to share my experience using the all_mutual_friends for a feature I'm developing for a social app. It has been acting weird and I would like to know your experience using it.
So, let's consider two users for this application, User A and User B - which they are not friends on FB. And as soon as any of the users connects, I grab the context-id of it.
Then if User A is seeing User B profile, I request all_mutual_friends for UserA with graph api with the syntax /{{context-id of UserB}}/all_mutual_friends
In my tests, I have an User C, which is friend with both User A and User B.
And here comes the tragedy. Sometimes it works, graph api brings data about User C, sometimes not. I mean, it was working until yesterday and at moment is not working.
I also use the graph API tool to check and re-check information and it seems it is not the code itself, but with FB.
All users have their account created as they would be regular FB users, I'm not using FB test accounts, they are included as Developers of the app and the feature is only available in development mode.
Do you guys have faced this situation? Is it related to the feature not being approved to be used public or there is nothing to do with it?
Thank you!
Related
I am working on a local application that needs to retrieve data from user's Facebook profile. As long as I can see, by default I can only get name, picture and age range, but I need many others information like education, location, likes and so on. I tried to submit approval for these items, but Facebook won't set my submission because I don't have a Privacy Policy URL added. I don't know what Privacy Policy URL to add because I'm working on localhost.
Please help me figure it out and excuse me if my question is wrong, it's the first time when I work with fb api. Also, if there is another way to retrieve this items, I would be more than happy to hear about it.
Have a look at
https://developers.facebook.com/docs/apps/review/login#do-you-need-review
It's saying that
in order to help you craft your Facebook Login experience, your app's developers will be able to see, and grant, any permission without requiring review by Facebook.
and
Also, if you're the developer of an app and are the only person using it, then your app doesn't need to go through review. Since you're the developer, all app capabilities should be available. You will still need to take your app out of developer mode, but you should be able to do that without going through review.
So, to be able to develop your app and request extended permissions, you don't need to pass your app to review, as long as you test with an app admin/developer/tester.
first time on stackoverflow. Was wondering about this problem I am having as mentioned in the title, my application cannot retrieve any data via the API for any profiles that are non-related in anyway (no mutual friends either). Is this a known thing due to privacy settings or permissions?
Thanks!
This is the rules you have to know, for example 100007110730790 is a non-friend id:
Rule 1. If the user turn platform Off:
Facebook API wouldn't work at all:
Rule 2. If the platform is ON and user 100007110730790 does not provide user_status permission for your app, you can get the feed with have tagged with you:
Updates:
if you are using your apps(not graph API explorer default app, this app wouldn't include activity feed!), you can also get public activity feed(add life event, change language, so on, even though he/she doesn't use the app at all!):
Update 10 jan 2014:
shared_story is included on this rule.
Rule 3. If the platform is ON and user 100007110730790 does provide user_status permission for your app, you can get the status feed even though non-friend!:
And using FQL:
So, for albums/photos is the same, the non friend need to grant user_photos permission to the same APP.
Yes, I guess. In any ways you shouldn't be able to retrieve something that is not normally visible to you. Looking aroudn Stackoverflow there are multiple threads with similar queries, so it seems like a known limitation.
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.
Is it possible to ban users from using a Facebook application?
I'm not talking about the canvas or the discussions board (which is what I've found by looking around), but the application itself, that is, causing errors or preventing actions whenever the user tries to use the Graph API (in my specific case, an Android app that uses the Graph API to provide some features).
The scenario I'm envisaging is something like this:
user authenticates app to use its features and gets the access_token;
user uses the Graph API according to the app permissions;
user someday does something he shouldn't;
user is banned and, even if the access_token is still valid, Graph API requests fail, and will always fail even when deauthorizing and authorizing the app again.
Is this possible using the Graph API or the developers app console on Facebook, right now, or is there really no way to prevent users from misusing your application? I guess I may do something "out of band" to enforce this somehow, but being able to do it at the Facebook level as well would be much more effective and harder to circumvent.
See https://developers.facebook.com/docs/reference/api/application/
Use the 'banned' connection of the Application object to ban specific users from your App - you'll need the App access token to do this
Just create a blacklist of specific Facebook User IDs, and check the user's ID against the blacklist when they log into your app.
If the blacklist matches, show a message telling them that they are banned and don't allow access to any functionality.
I want to implement Facebook connect login for my Django site and I've checked the already existing apps.
So far, I have found Django-Socialauth, django-socialregistration, and django-facebookconnect for this purpose.
The question is which one to choose, and I would like to hear from other developers who have experience with any of these apps.
It is important for me that the Facebook Connect login app plays nicely with #login_required, with the default auth system, and with django-registration.
Please share your experience :)
Update (11/26/2013): I'm updating my recommendation. Since a sufficient amount of time has passed since I wrote this answer, I would recommend python-social-auth or django-allauth as the best tools for the job. They are active projects with good documentation and support for a lot more than just Facebook. I've had success using both.
I have had the most luck with adapting django-socialregistration with django-registration (0.8). Since you're working with django-registration, you're going to have to do a little bit of work, since all three of those packages assume the role of both the creation and the authentication of the user.
I was just going to explain what needed to be done, but you inspired me to finally get my version out: hello-social-registration.
Like I alluded to, it separates gives the registration functions to a django-registration backend and handles all the authorization itself. I've been using this on my near-beta application for a while now with no problems (I also handed it to a friend to use a few months ago and he got it to work without much modification).
It's definitely not ready to be a plug-and-play reusable application, yet, but hopefully it'll provide you with some insight. :)
By far the most commonly used package for Facebook authentication in Django is Django Facebook:
https://github.com/tschellenbach/Django-facebook
It also gives you access to the facebook APIs using the included Open Facebook api client.
I wanted to implement a basic "Login using Facebook" functionality in my Django app. I didn't want to show the user a form to fill or have her choose a password. I preferred to make it seamless.
Based on my requirements, django_facebook_oauth was the best app for me. It simply allows the user to login using facebook, and gets the user info my Facebook app requests from her (based on my Facebook Auth Dialog). It creates a new user in Django with the user's facebook email, a username and a blank password.
I highly recommend it.
Hi Take a look at fbconnect app that we (actually, Hernani, a guy on our team) put together for osqa (a clone of CNPROG).
You will have to, probably, tinker a bit to adapt that to your needs. It does work with #login_required decorator and the standard django.contrib.auth system, but we do not use django-registration.
Our app also works with openid and password login, but the openid part is tightly coupled with the Q&A component at present.
We may separate it though some time in the future, if anyone might be interested in "anything-signin" django pluggable app or has something better already - pls let us know.
I've used django-allauth and django-facebook on two different projects.
django-allauth was great and provided very good support for logging in and creating user profiles. It could also work with other auth providers, which I didn't implement.
django-facebook worked out of the box, but it's only compatible with Facebook. It also provided simple APIs for fetching users' likes and friends from Facebook directly into the db, which I liked very much!
facebook.get_and_store_likes(user)
facebook.get_and_store_friends(user)
I played with .NET based libraries and found them to be frustratingly out of date. Facebook seems to change their APIs frequently, so if you cannot find a library that is routinely maintained, you will find that you will get halfway through your implementation before you realize that there are serious problems.
I had some success with the javascript API that Facebook publishes and maintains. While the documentation may not be always up to date, I found that I was always within striking distance of the correct implementation (one or two changes needed).