Fetching data streams from facebook authentication. - android

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.

Related

Facebook based mobile App to access user's FB main page?

I want to develop an FB based mobile application where a user can access into his(her) FB main page thru the mobile app.
Then make a user extract info and surf into his friends FB the main page as well. I wonder how to implement it?
I suggest you start with the facebook api for android. It is pretty powerful but it doesn't give you the full level of control that some other web based api's provide. https://developers.facebook.com/docs/android/getting-started
Facebook Login - Enables authentication with Facebook credentials.
Share and Send dialogs - People can share content from your app to Facebook.
App Events - Log events in your application.
Graph API - Read and write to Graph API << *look here for what you want to do*
If this isn't enough, you will want to explore the web and javascript api's which appear to provide more access than the current android api.
https://developers.facebook.com/docs/web
https://developers.facebook.com/docs/javascript
Note that your app may not be able to access all of the information you want it to access unless your friends have also installed your app and given it the appropriate access permissions.

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...

Identity 2.0 Web Api, iOS and Android Clients Facebook app approval always rejected

Here is our setup:
1) a Web Api project with ASP.NET Identity 2.0 with external login support for Facebook.
2)A native iOS App and a native Android App
We are using the appid and secret in the web api and the identity Facebook authorization options. and using web views to do the login process for Facebook. However, we are also, after the user is authenticated, allowing them to share different pieces of the application to Facebook. Currently, the website shows the scope of publish_actions, user_videos and user_photos.
Facebook is telling us that custom web views are not okay, and that we have to use the native SDK's on all of them. What's the purpose of identity providing the ability to utilize getting external accounts and access tokens if you can't even use them on a mobile app? All of our code that does the sharing process happens on the actual controllers in the web api project. We display a popup that allows the user to enter the text that gets posted, just as Facebook describes.
How can we submit a Facebook App that will explain to them that the website is the actual application that utilizes the Facebook actions we are requesting?
Is this even possible? if not, why is the technology even available to allow external logins via an api, when you'd most likely be using it to service a native mobile client??
Thanks for the help,
Brent

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/

Using Facebook scores API in an Android App?

I am integrating the scores API for facebook in an Android game. I had the exact same problem as this question: Facebook Graph API Explorer won't POST scores. The fix was to set my app as Web instead of Native/Desktop. Is it because scores API should not be used by native games? Is it somehwat dangerous to set up Web for a Native app?
Thanks
I have noticed this too, however I wondered if it is 'by design' as to use the Facebook Scores API you need access to the app access token (in order to do things like submit scores) however this isn't considered a safe thing to use from a native application. Here is a quote:
"App Access Tokens should only be used when the posting functions are originated directly from your servers in order to keep them private to the app. For example, you should not publish using an App Access Token from within a native mobile app. Doing that could allow the user to obtain the App Access Token, which could then allow them to take actions on behalf of your app. Instead, you should have your native mobile app queue actions up with your server and then have your server publish the stories to Facebook using the App Access Token."
Here is the website in question: http://developers.facebook.com/docs/opengraph/using-app-tokens/.
So, it sounds like the only way to really use the Scores API is to have the native application securely talk to a separate, secure, server (potentially on Heroku) then once that server has verified the passed data, it would then talk to Facebook and submit the score using the app access token (which it can safely use without the user getting hold of it).
On top of this, the Facebook Scores API only supports having one score per application (not per level, per mode, etc.) scores, so in order to have anything more advanced the extra server is required anyway, so a database can be stored that maps Facebook user IDs to the various scores one wishes to score.

Categories

Resources