Facebook locale and currency - facebook

The locale and currency field of the User Graph API object is Deprecated!
How do I can determine the locale of a person using my app?
I need this information for app localization
How do I can know about user currency for correct display of the products in my app?

You can now find user_currency in the payment_mobile_pricepoints field.
Don't forget to add payment_mobile_pricepoints to your "/me" FB API request

If you are using web canvas app, you can get current user locale from POST request, which facebook platform do each time when your app started. So you can find 2 fields: signed_request, fb_locale. It works only for current user.

Related

Are there any API to get Facebook profile URL by using the phone number?

I have a phone number, how can I get a user ID on Facebook so that I can go to the user profile by https://www.facebook.com/user_id
In Vietnam, there is a page can do that: https://atpsoftware.vn/finduid/
It is not possible, there is no API for it. Scraping is not allowed, and the phone number would need to be public anyway to make that work.

Facebook Messenger Platform: how to get user specific information?

I'm trying the recent released Facebook Messenger Platform and so far so good. Everything worked well and I was able to create a echo bot.
But I'm wondering how I could identify this user that started chatting in my page. For example, when a user started chatting I get a PID user (page specific user id).
Making the follow request to Facebook Graph API:
GET https://graph.facebook.com/v2.6/{PAGE_SPECIFIC_USER_ID}
I discovered that I can just ask for the following fields: first_name,last_name and profile_pic.
So my question is, how could I discover if this user is a current customer of my business page? Is there another way of querying more information (like e-mail and real facebook user id)?
Facebook has updated the messenger platform API (2016-07-01) and introduced a new feature called Account Linking. This can be used to identify a user who has created an account on your website via Facebook Login and you can link the two accounts. Facebook login has its own set of permissions which can be used to get a lot more information via Facebook graph API. You can find the complete list here.
Currently, there's no way to do this. The best way would be to prompt the user to enter their information in chat or give them a link to a mobile login page or some other way of linking their account to the chat.
Messenger Platform 2.0 introduce "ID Matching API" ,that will solve the problem.
https://developers.facebook.com/docs/messenger-platform/connecting-accounts
you can retreive a user information like below using fbmq library https://github.com/conbus/fbmq
# this method will occur when a message received from user
#page.handle_message
def message_handler(event):
user_profile = page.get_user_profile(event.sender_id)
print(user_profile) #first_name, last_name, profile_pic, gender ...

Facebook invitable_friends API with user locale

I use Unity3D to build WebGL game. And, now I'm trying to implement the invitable_friends API to show friend name.
I retrieved Friend's name in Unicode like "\u0e01f"(Thai character "ก") and "\u30b0"(Japanese character "グ") from Facebook Graph API.
In invite friend list, as I implemented my application with Japanese font, the "\u0e01f" character is not show.
So, I think about get the user's locale. Then, assign the correct font to show friends's name.
Do you have any ideas how to show user name with all language support?
or
Is it possible to get user's locale or country for invitable_friends API?
Thank you in advance!!
PS. I already tried the following query, but it's not work at all...
me/invitable_friends?fields=country,locale,name,id,picture

Facebook graph API 2.1 signed request values

I try to use new Facebook graph API now.
I have a page tab application.
So in old API (1.0) i just Pars a signed_request parameter and took out of it page.liked parameter to determine if user liked my page or not.
In new API i get parsed signed_request like this:
{"algorithm":"HMAC-SHA256","issued_at":1407738045,"page":{"id":"xxxxxxxxxxxx","admin":true},"user":{"country":"ru","locale":"en_US","age":{"min":21}}}
On Facebook documentation i find: "This field will no longer be included for any app created after the launch of v2.1 (August 7th, 2014), and will be permanently set to true for all other apps on November 5th, 2014"
So how i can know in new API if user liked page?
Its now against's Facebook's policy to gate access to an app or content within an app based on if the user has liked a page. See https://developers.facebook.com/policy
As part of this, they've removed the technical ability to determine if the user has liked the page when an app is rendered in a page tab.

Get the current facebook application ID is visited by the user using facebook C# dk

I Have More than One Face Book ApplicationUsing the same Solution what i need is to get the current apid visited by the user using facebook C# sdk.
thanks in advance
you can store the facebook application settings in DB then when the use r enter your facebook application get the id from the url using http.context.request.url or something like that where you can load your settings abon the app ID