I need to retrieve facebook user language with php - facebook

I'm building a very simple facebook app in which I would like to retrieve the facebook user language.
Since now, I retrieve the browser language to give the right language for the user but I think that retrieving the facebook user language is better and more precise.
Is there someone who can help a beginner?

Check out user node field locale.

Related

Can I Use The Facebook Name And Logo On A Login Button?

I'm using the facebook-unity-sdk and have integrated facebook login for easy user authentication. This seems to be encouraged. However, I am at the point where I am designing my login button, specifically to log into facebook, with permissions requests and what not. When designing my button, am I allowed to use the facebook f logo or the word facebook or anything similar?
If so, where can I find the logos or fonts that would be appropriate for me to use?
I found the following site, but it appears unclear for my circumstance.
https://developers.facebook.com/docs/apps/review/branding
The website you linked to (https://developers.facebook.com/docs/apps/review/branding) already provides lot of information. The global message is:
Don't use facebook brand names or logo for anything else than linking to facebook
This other website should provide you with the logos you can use: https://en.facebookbrand.com/assets/f-logo and gives you the info you were looking for, basically:
Don't modify the facebook logo
So you can use the facebook name and logo as long as you don't modify them and that the usage is not confusing (it really redirects to facebook applications). Hope this helps

Information about Facebook logins and unique pages

I need to learn how to implement login into a website but I've heard that I shouldn't make a custom script unless I really know what I'm doing.
A better alternative I've hard is to just use Facebook login. I've looked over the docs but I'm still confused on something. I want to store additional information about the user (not just their facebook profile information) and I need to use that information to generate unique pages when they're logged in.
I am also wondering if the additional information I save about them will be just as secure as their facebook information or if it will be more vunerable.
If someone could guide me in the right direction with direct answers or useful articles I would very much appreciate it.
Read through the docs for login with Facebook and try out the sample code provided. That will give you a clear idea how to integrate Facebook login in your website.
In order to integrate login with Facebook you will first require an app id which is quite simple to create. Once you have the FB app id, you can integrate the login bit. Once the user successfully logs in, you should get back an app-scoped user id and as suggested by Lix use that as the primary key. Also, after user logs in, you can may be present a form where you collect additional data and save that against the user id in the database.
Regarding the security of the information, it really depends how and where you store it.

Personal results while using Facebook Graph API search

I'm developing an app in which the user needs to search and select a person from Facebook. I'm able to search in the Facebook Graph API using "https://graph.facebook.com/search", however this only give very general results and not the 'close' people Facebook would normally suggest when searching in the search field on Facebook.com. In this case it is impossible to find someone with a regular name.
Does anybody know how I can personalize my query or go around this problem?
The Graph API search is not the same nor directly comparable to the search in the Facebook website.
See
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search

iPhone App to read Facebook wall

I want to create an iPhone app that displays (among other things) a specific Facebook wall. For a good user experience I didn't want an app that required the user to have a Facebook account and I didn't want to force the user to have to log in to Facebook to see the latest "news" in the app. I started out by getting the wall RSS feed and tried parsing it ... I can "see" all the data I need ... but that is getting complicated quickly and has too many variables that are making the final results less than stellar. I have read through the Facebook iOS programming tutorials and it seems to me like the SDK forces the user log in, which I don't like.
My question ... Is there a way to use the Facebook SDK with hard coded profile credentials to access a specific wall without forcing the user to login? If possible, is that a recommended approach? Any other ways to skin this cat?
I have read through the Facebook tutorial and searched through many postings on this site but haven't found an answer to this ... sorry if this a newbie question and has already been answered.
Item I.2. of the Facebook API policy list says
You must not include functionality that proxies, requests or collects
Facebook usernames or passwords.
It sounds to me like that's what you're proposing to do; i.e., the user will be able to see a certain wall, but using hard coded credentials (not their own). In other words, your credentials are proxying for the user.
I do not know if it is technically possible to do this (I imagine it is) but I don't think it's a good idea, and I do think it's a violation of the Facebook API terms of service.
First you need to get the a access_token by parsing your app id and secret.
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET
Then send following request to get the data you want. Note that only public data will be accessible.
https://graph.facebook.com/FACEBOOK_USER_ID/?access_token=ACCESS_TOKEN

Can we implement autoshare in facebook using xcode?

I am doing an iphone application in which i need to provide autoshare option to share automatically the text in an UIView in facebook when we click save button. i will save the facebook username and password of the user in datbase and retrived and want to assign for facebook and password without FBDialog... is it possible? Can anyone help me?
Storing a fb user / pass combo is probably out of the question. Your best option is to use the Facebook iOS SDK and then ask for offline_access & publish_stream as part of your permissions when you authenticate the user. This way you will be able to access the users data at any time and post to their wall at any time.
The method you seek to implement IS possible, just frowned upon and somewhat unethical.
Hope this helps.