Sending friend request in facebook using mail id - android

i am integrating the facebook to my android application, here i need to send friend request by using mail ID which has been registered as linkedin done through their api calls.
i researched more and spent lot of time on this i could not get any solutions, so i request you guys to provide me any sample codes or any solution for this.
Thanking you

There's the Friends Dialog but I can't say if it works well in android (using the Dialogs) but you should be able to open it in a webview.
Notice the restriction/warning on the documentation:
This feature is intended to help users become friends on Facebook with
people that they are connected to in real life. You should not use
this feature to encourage users to friend other users that they are
not connected to in real life. If your app is found to be encouraging
this behavior, your usage of this feature may be disabled.
With that said, you can't use email as an identifier, the entire facebook api (graph and fql) works with either the user id or username.
If you check the User fql table you'll see that only indexable fields are uid, username and name.

Related

What is the best sutiable way to keep my user's data in Android

I want to add user authorize system in my Android application. At first glance it looks very easy, however; when I start to research, I encountered too many problems. Because every person can download my apk file and can see my auth system code and can send HTTP POST requests from anywhere.
Firstly I founded that link below
http://android-developers.blogspot.in/2013/01/verifying-back-end-calls-from-android.html
It was looked me very complex and I thought that there can be more simple ways that can be fee.
I tried to use Amazon Cognito and completed all login protocols using facebook and google+. Finally I encountered a big frustrating problem. If user would use different login system in different devices, Cognito can not understand that are the same user. I asked this problem in Cognito forums and their offical answer is below.
We use tokens issued by providers to determine identity. If you login
using Facebook on one device and you use Google on another device,
there is no way for us to determine that these tokens belong to the
same user
then I decided to use Google Cloud mobile Solutions but I learned that It is banned in China mainland which My app will also be Chinese.
parse.com is very slightly but It does not have Google plus login.
I haven't only tried Microsoft Azure because Its documentations are very confusing. But If I can be sure that It compeletely works, I would learn everything about Azure.
I am enhuaist to search the best suitable way save my users data on remote server. What is your suggestions ? Which way should I follow ?
Thank you.
Why is Cognito not working for you? There is no identity provider who will ever be able to tell a Facebook user and a Google+ user are the same person. They are completely separate platforms. With Cognito, if a user logs in to both Google+ and Facebook on the same device, then it will know they are the same person. Amazon SNS (Mobile push) can also push to Chinese devices.

Android: allow signup with Facebook and store more information

I'm working on an android app and I want to allow users to register using Facebook, Gmail etc.
My question is not how to do that, because there are many posts regarding that including tutorials written by Facebook and Google themselves.
I want to achieve something similar to the Stackoverflow log in - the users are allowed to login using Gmail for instance, while the site (or app) also keeps its own data about each user (namely, my profile).
I'm not quite sure how to achieve something like that in Android, since the Facebook and Google SDK's allow my app to access the user's facebook name, email (and any public information), but I don't think they allow me to add more data about this user my app needs for its own purposes.
What I was thinking of doing is to manage a DB of my own where I could store the additional data (for instance, using Parse.com), and use a common field to all services as a key (was thinking about email, since Facebook, Gmail & twitter all use that - do you recommend this?)
Are there other (better) ways to achieve what I want? perhaps Google offers something I don't know?
How safe is this (though I should mention that for now the app shouldn't gather any personal information).
As always, any help would be appreciated.
Thank you.
Store the user's email in your own database along with its session key (don't forget to update it after each login). When the user makes a request to the server after he logs in check the email and session key he provides and use them to get his row in the database, where you can store more information about them.
Regarding Parse.com: They have their own implementation of Facebook login.

Retrieving list of Facebook friends who use iOS/Android

I'd like to target a message to my Facebook friends who use iOS, and separately, Android. If I'm going to recommend them a particular app, for example, I'd like to ping only those who have the right OS. Presumably Facebook has this information. Is there a way for me to retrieve it?
I do not think Facebook would expose this kind of information on their API. What you could do is use Parse and its Installation class. By doing so, you will get specific device information of each of your users. Then you can use the Parse Push SDK to target specific users based on this information. As an added bonus, Parse also offers Facebook integration, so it might be the tool you are looking for.
You can use the Facebook Message dialog for iOS and Android to let people send messages to their friends via Facebook Messenger. See https://developers.facebook.com/docs/android/share#message-dialog and https://developers.facebook.com/docs/ios/share#message-dialog
However, in v2.0 of the API there is no way to find out which of a users non-app-using friends are using Facebook on which platform - and in any case, the dialogs don't let you pre-fill the recipients.
If you want people to invite their friends, but want the recipient to end up being redirected to the correct (iOS or Android) version of your app, I suggest sharing the same URL, and then doing user-agent detection when someone clicks on the link to determine if you want to redirect the users to Google Play or the Apple App Store. Services like Deeplink.me may provide this as a hosted service: https://www.deeplink.me/

Eventbrite OAuth authorize Site for Mobile

My iOS and Android apps offer the possibility to attach Eventbrite to a user's profile.
However, the authorization page at "https://www.eventbrite.com/oauth/authorize",
is not well formatted for mobile, with things like the login and password text fields stretching wider than the view itself.
Is there a more mobile friendly login page for Evenbrite's OAuth apis?
Or perhaps am I missing a parameter to https://www.eventbrite.com/oauth/authorize to make it look better on mobile?
I sent a mail to Eventbrite today to ask about the same thing, here is the answer :
Hi Ivan!
Thanks for contacting us! Mobilizing the login page is on the short
list for upcoming features.
Unfortunately, we don't have an exact timeline yet -- but stay tuned
by subscribing to our newsletter and we'll let you know:
http://eepurl.com/buGfH
Cheers! Mitch

Leverage Twitter / Facebook credentials by pulling information from other app

I'm being asked if it's possible to have the ability to leverage facebook and twitter credentials by pulling account information from apps that are already installed and authenticated.
This means: an app is running and the user is logged in through FB or TW. Then, it launches my app. Could get those credentials and keep the user logged in on my app too?
I think this could be not so good to do it, but they are asking to me for an answer.
I did research and didn't find anything related, so I am thinking that it's not possible.
Could anyone confirm this or tell me how it could be done?
No, you can't. Each application must be registered on the respective social network, to obtain a application key and application secret. You then have to request a authorisation token from the server of the social network. Since the token is based on the specific application key and secret, even if you would be able to leverage this authorisation token (say on a rooted device), it would be useless to you, because you´d also have to know the key and secret. Ands Facebook matches the app signature as a extra layer of security.
Plain and simple no :)
If you just want to share data to Twitter or Facebook from your app, you should do this by using a share Intent. This way you push the data to whatever app (FB or Twitter, or others like email and messaging) while the user picks which app they choose to publish this data on. See more info at the developer blog here: http://android-developers.blogspot.com/2012/02/share-with-intents.html
And tutorial here:
http://mobile.tutsplus.com/tutorials/android/android-sdk-implement-a-share-intent/
If you want to do specific things with the authenticated account, like retrieve the user's timeline or wall posts, I don't think you'd be able to borrow that authenticated token from another app. You will have to register your app with each social network, ask the user his/her credentials and obtain a token. Then you can grab data from these services.

Categories

Resources