Would you please let me know how to use facebook API for find all business data('address', website, phone, email and so on)using business "Name" and "Zipcode"?
Currently I used like this :
$response = $fb->get('username?fields=id,name,emails,location,phone,website,link');
But instead of "username" i need to pass business "Name" and zipcode and based on this fetch the data.
Please let me know if you have any soultion.
Thanks
Related
I am creating an app (Xcode, swift) that has a profile page for each user and I want their name to appear on that page.
I have been able to get their email address through:
let email : String = (Auth.auth().currentUser?.email)!
How would I gather the users name? I have the users UID as well.
I am using firebase by the way
If you are not using Google or Facebook to log in with firebase, You need to manually create the profile for each user. See Update a user's profile
If you're using a social provider to sign in, you can get the display name from that provider through Firebase with:
Auth.auth().currentUser?.displayName
If you're signing in with another provider, the display name won't automatically be set, and you will (as Abdullah answered) have to create your own registration system where the user enters their name - and you then store it in the displayName property of Firebase Authentication.
To achieve what you requested, you either have to use a social auth provider (such as Google or Facebook) or change it yourself from the client, as the other answers suggest.
First of all, you would have to create a changeRequest, using the following code
let changeRequest = Auth.auth().currentUser?.createProfileChangeRequest()
Once the change request is created, you can change whatever basic information you need to (either the photo URL or the display name) with the following code:
changeRequest?.displayName = "Lorem ipsum"
changeRequest?.photoURL = "https://your_link/path_to_image.png"
Finally, you must send the change request to Firebase, which will handle it and possibly return an error for you to handle.
changeRequest?.commitChanges { error in
if let error = error {
print(error.localizedDescription)
// You can handle the given error here
return
}
}
As others have already pointed out, you can find this and more information on the official on the official Firebase docs website.
Hello I am new at facebook graph API
when I used url like this
https://graph.facebook.com/v2.7/me?fields=id,website,about,first_name,last_name,gender,birthday,education,age_range,email,%20television,movies,hometown,context,devices,favorite_teams,work&access_token=EAAM...
I can get website, first name , gender etc of me
but when I try to get another user's information from this url
https://graph.facebook.com/v2.7/{user id}?fields=id,website,about,first_name,last_name,gender,birthday,education,age_range,email,%20television,movies,hometown,context,devices,favorite_teams,work&access_token=EAAM...
I can get null values expect first_name, last_name and id
How can I correct the mistake?
Note : the other user allows to show this info.
Thanks
'm using the Facebook SDK 6.0 for Unity3D.
After my user accept the connection, I want to save his ID, email etc ... on a Parse database, and have the possibility to get some info from this database for this player (for exemple : the list of unlock levels).
How can I do it ?
I know how create an object, but I want to know, after a connection on Facebook, how to save the user and some details on Parse, without using the Parse login (as on the official Parse tutorial).
I can't understand.
Thank you very very much in advance for your help.
Best regards,
AB
You can try saving this information in the local ParseUser Object. Just add custom fields with the necessary information. For more complex solutions you can create a custom parse object to save the information.
https://parse.com/docs/unity_guide#users
var user = new ParseUser()
{
Username = "my name",
Password = "my pass",
Email = "email#example.com"
};
// other fields can be set just like with ParseObject
user["IsUnlocked"] = true;
Task signUpTask = user.SignUpAsync();
and for Facebook there is a special signup method in the ParseFacebookUtils class
https://parse.com/docs/unity_guide#fbusers
Task<ParseUser> logInTask = ParseFacebookUtils.LogInAsync(userId, accessToken, tokenExpiration);
I wanna know a user who like post or not by post id
facebook graph api i only found a post details (/{post_id})
and take its liker array, but it cost too many request and time
does any api function could directly check a post liked or not?
thanks for your reading
As far as I know, there is no way to do this directly with Graph API.
You have 2 options to find this :
Option #1 :
Requesting the api to find every people who likes a specific post, with this kind of request :
https://developers.facebook.com/tools/explorer/?method=GET&path=10150217223114971%2Flikes%3Ffields%3Did
Caution : This method will ony return you the last 5k likers ID
Option #2 :
Use FQL and requesting "like" table : https://developers.facebook.com/docs/reference/fql/like/
read_insights permission is granted, and I can access domain specific insights data with :
https://graph.facebook.com/insights?domain=example.com&access_token=TOKEN
However, I need to get url specific insights : actions, impressions, referral traffic. This post suggests url specific data can be retrieved as :
https://graph.facebook.com/insights?id=YOUR_URL&access_token=TOKEN
this only leads to null dataset for any page on my domain. facebook.com/insights show data, but my graph call is always
"data": [
]
How can I get this data ?
Use Facebook URL Linter and get ID of URL.
after that request https://graph.facebook.com/ID/insights?access_token=TOKEN