Retrieving list of Facebook friends who use iOS/Android - 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/

Related

Check if user has an account on WordPress site

I'm working on a mobile app specifically for students at my university. Our school's web portal uses WordPress (or at least the login page is /wp-login.php).
Is there a way to send the user's browser to the login page and then send them back to the app with a confirmation that they were able to sign in? Or even better, include their username? I've tried a bunch of different Google searches, but most of what I've found requires installing/configuring plugins in the WordPress install, but that's not an option, since I'm just a student.
Thank you!
Well, since the site is not hosted at WordPress.com, you will have to implement your own API Endpoint for your Single Sign-On procedure.
But first contact the site's admin or developer/s and find out if they have already implemented such a mechanism.
If they haven't you can see here how to create an API Endpoint in WordPress, that your mobile application will use to authenticate users.
You can find more information here.
If your university's site does not support the functionality and they are not willing to implement it, I 'm afraid that you cannot do anything...

Fetching data streams from facebook authentication.

Hi I am designing a mobile app where users can login via facebook. The reason I use facebook login is because I can use facebook to reach out the users friends.
I would like to know is it possible to fetch the user email, friends email, address etc.... using a android app ?
If I can do that I can mass distribute my game.The posts on stack overflow regarding this topic is all on web app. However, I haven't seen any mobile game doing that, it seems most games uses PC version. They fetch those information using the web app not directly through the mobile app itself.
You can use android SDK provided by Facebook.
Graph api provides whatever you need https://developers.facebook.com/docs/android/graph/.
There are many apps using this technique.https://developers.facebook.com/docs/games/mobile/bestpractice
They update user status for advertisement.

Is possible to synchronize a particular facebook page onto an android app?

I was wondering if it is possible to catch feed of a particular facebook page without any authentication and just display all the posts posted by the admin of the page (possibly along with all comments and likes).
I took a look the facebook developers page but could not find anything relevant.
You can access the public information of any Facebook page without any permissions.
However, You do need to register your app on FB first. They only allow access to their Data from registered apps. It's FB's way of making sure they know who's using which data and how much of it.
You can create a new app at this URL
https://developers.facebook.com/apps
Here are links to mobile/web docs for using Facebook's API
https://developers.facebook.com/docs/

Sending friend request in facebook using mail id

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.

Facebook authentication from android using secret key and app id but not signature

Basically I am developing an android application which can post updates to my facebook wall through my web application server. So actually my web application post my updates in facebook. I am authorizing my android application like a webapp and not as a native android app. I downloaded the facebook for android SDK and tried examples by creating signature using keytool. I am able to post the updates from android as native app. From my web application, I am not able to post my updates through the access token I get.
I am not able to find an android example for facebook SDK which uses the secret key and app id for getting the access token. Can you please give me some pointers on how to achieve the same using facebook SDK..
Thanks.
I haven't tried this yet but there is documentation online and it's quite clear:
You can find the description for al the methods at the following link
https://developers.facebook.com/docs/reference/androidsdk/authentication/
You can also have a look at the code, if something isn't clear enough
https://github.com/facebook/facebook-android-sdk/blob/master/facebook/src/com/facebook/android/Facebook.java
As far as I can tell you don't actually need the app secret in order to authenticate, only the app id. This is because it would be quite insecure to put the app secret on the phone(in the apk) since someone could retrieve it. So the resulting token will expire after a fairly short amount of time(couple of hours or so).
Also here's the complete guide to using the Facebook SDK on Android for authentication:
https://developers.facebook.com/docs/mobile/android/build

Categories

Resources