I need to integrate Instagram API to fetch user's details like username and email and need to save these information for the user,
i read the below link:
https://developers.facebook.com/docs/instagram-basic-display-api
but this does not fetch the email id of the user,
i also read below link but it also does not provide email of the user:
https://developers.facebook.com/docs/instagram-api
If any body can reply, that will be helpful,
Thanks
That's a privacy issue to be able to fetch user's email and other information I think you would need to create an app that allows sign in or login then get any user that had signed in to your app, details for example if I sign in to your app you would need to get my email address you can do that using a simple database tool then convert that into an API by performing a post request once data has being sent to the database.
Related
Does Firebase count the getting current user id or email (Auth.auth().currentUser?.uid , Auth.auth().currentUser?.email) as a read operation and charge it? I searched the documentation but could not find any information.
No, there is no charge associated with getting current user id or email or any kind of auth information. Firebase auth is completely free except the phone auth. You can have unlimited number of users in Firebase Authentication with email, Google, Microsoft etc.
The charge with reference to the read operations is for Firestore. It is totally separate 'module' than Authentication.
The code you're showing is just working with Firebase Authentication, which does not have any billing associated at all for its API, except for use of phone authentication. This should be clear from the documentation on pricing.
Is there any way to read mails from group email id or is there any way to read emails without graph api?
And also is there any way to restrict graph api token to read only from desired email account?
You should use GET /users/{id of group email}/mailFolders/{id}/messages to read mails from group email id.
See reference here.
If you want to restrict graph api token to read only from desired email account, you should implement Get access on behalf of a user. Then you will be able to access the signed-in user's email only.
To answer your first question, the following call will get you the emails in a group mailbox.
GET https://graph.microsoft.com/v1.0/groups/{group-id}/conversations
Can you ask your second question in a new post as it is not related to the first? Make sure you provide information about what you are doing. What auth flow are you using?
I am unable to to sucessfully to do , I followed the following steps as instructed on Firebase Docs:
Signed in use using existing auth provider(my case:facebook).
Complete the sign-in flow for the new authentication provider up to, but not including, calling one of the Auth.signInWith methods.(my case: i want to link email & password and Google OAUth). So this is the step i'm unclear about, I created a new provider using var provider = new firebase.auth.GoogleAuthProvider(); and I did not do Firebase.auth().signInWithPopup(provider) .
Then to get authcredential for google I run var credential = firebase.auth.GoogleAuthProvider.credential(
googleUser.getAuthResponse().id_token); (I get an undefined googleUser error) this error seems appropriate since I have not signed in using Google Oauth but thats what the 2nd steps states(not to signin)
And then this command to link with the current user who is on a Facebook Provider auth.currentUser.link(credential)
My understanding is that currentUser needs to be linked to my existing Provider(Facebook). It seems that credential variable for google is never computed. Anyone with a functional code example would really help.
If you want to manually link a google and email/pass account to existing facebook only firebase user, you can do the following:
First, the user should be signed in to Facebook.
Link the google user:
var provider = new firebase.auth.GoogleAuthProvider();
auth.currentUser.linkWithPopup(provider);
Then link the email/pass account:
auth.currentUser.linkWithCredential(firebase.auth.EmailAuthProvider.credential(auth.currentUser.email, 'password'))
All these accounts to be linked must be new and not already linked.
#bojeil I have read your question and I found the way to log in both Google and Facebook logins having the same email account. First, in the Firebase, you need to allow
"Multiple accounts per email address"
Allow multiple accounts per email address
Now you can log in with both Facebook having "xyz#gmail.com" & Google having the same email name as "xyz#gmail.com".But you will encounter the email as "null" for the second login having the same email. You can get over the null problem by using the below snippet.
Just use this snippet in on success task from the firebase:
Map profile = task.getResult().getAdditionalUserInfo().getProfile();
Object email = profile.get("email"); /// Obtaining the email from the use though we use same email form facebook and Google log in accounts.
By this way, you can log in into both Facebook and Google logins using the same email.
I hope you got your doubt cleared with this info. Can you please get back to me if this suits your question?.
Thank you.
I have used facebook api to fetch details of group members.
using api i can fetch user first name, last name but not able to fetch email address.
this is code
$member_profile = $facebook->api('/group_id/members?fields=id,first_name,last_name,email,gender,birthday');
You either did not authorize with the email permission or the email is not confirmed in the Facebook account - it´s also possible that the user did not login with his email, afaik you can login with a phone number too. In general, you can never be 100% sure to get an email from the user.
Debug your Access Token and make sure the email permission shows up: https://developers.facebook.com/tools/debug/
In a Facebook application, is there anyway I can let a user send a message to another user (to his Inbox)? Even if there is no direct access, is there some kind of a link structure I can use such as:
"facebook.com/example?sendTO=user-id" that will prompt a facebook popup to send a message a user?
Joel
You can't send a message to another user via facebook's apis as no function exist for this. The only way to send personal and private messages are via emails (proxified or not), then the user must install your application and accept to share its email.
Just add "messages" in between the link:
If the persons id is https://www.facebook.com/some.one.007 then write
https://www.facebook.com/messages/some.one.007
Thats it.