Alternate Publish Actions for Submitting a Facebook HighScore? - android

I'd like to submit a simple highscore onto the Facebook Open Graph and I'm doing it through Unity/Facebook SDK for Android. I'm using the built in:
FB.API("/me/scores", Facebook.HttpMethod.POST etc**.....
Everything is working.
However, I'm really unhappy that I need to request publish_actions permissions, in order to submit a score. (I'm requesting these permissions on login).
Reason:
It pops out 2 dialogues. One for accessing public profile, & then a "Post to your friends on your behalf.
I tested my app on my sister, and witnessed her instinctively declining the 2nd Dialogue :"Post to your friends on your behalf"..
So basically, majority of people will not be submitting highscores, simply because they decline the misleading "Post to your friends on your behalf" request. when I simply want to submit a number >.<
Which defeats the purpose of my whole app, which is friends/social highscore based.
Does anyone know any alternative strategies to submit highscores onto Facebook Open Graph in a more "friendlier" manner?
Would be much appreciated!!!

You can't do anything regarding this- this is by design.
Try to understand- if facebook dont show this dialog, then apps can publish spam etc. on the user's wall unnecessarily. So, in order to save the spamming etc. this dialog appears so that user can "choose", whether he wants to allow the app to publish on his behalf or not. This is necessary, hope it makes sense for you!

Related

Can a 3rd party app generate a facebook like in the background ( assuming the user is logged on via FB and agrees to like the page of course )?

The app can redirect you to the FB page in question and get you to press the like button. Trying to understand if that can be done quicker. Tks
No, that is not possible.
Facebook allowed liking certain object types in the name of the user via API until a while ago - but it has been removed since, simply because the feature was abused too much.
And Facebook pages could never be liked via API, that has always been possible via the official Like buttons only.

Social media and regular login in app using own db

I'm currently building an app (android and ios) for which I now need users to be able to login. It must be possible to both sign up regularly (entering username, password, name, mail etc.) and to login through various not yet determined social media such as facebook, twitter, gmail, hotmail.
Now my questions are as follows:
1. Are there any framework's supporting this kind of in-app+social media login scenario ? (I know there is stuff like auth0 but it seems that you don't have that much control with this. As I'm going to save statistics about user navigation and such I think it would be preferable to store all my users in my own db, regardless of their way of logging in. Thus to me it seems like what I need is just an easy way of getting information from these social media and then register users as if they had just signed up regularly am I right ?
2. Anything obvious I'm missing ?
All of these social media sites have their own sdk's that allow you to login users and get certain information from them. So using a website like facebook's sdk you request certain information about the user logging in such as email and first/last name, then save this information in your database including it came from facebook. You will need to also create/encrypt a password for someone coming from a site like this. This is very important, obviously they won't give you access to a user's password but you don't want the user's account on your website to be vulnerable. I would limit the number of ways to login because you will have to program and work with each websites sdk in order to do this. Probably just use your own login and a facebook login to start
Here is a link to facebooks website for developers which gives you access to their sdk's for different platforms https://developers.facebook.com/docs/apis-and-sdks

How to handle Facebook/Google login in android app having lot of activities?

I am new to authenticating through social networks on android so pardon me. I created activity with which i can login through facebook and google. I am planning to do this : user comes first time, ask him to login through Google or Facebook, once he does, let him go to other activities. How do i handle scenario when user closed and restart my app. I want my app to work both offline and online.
Method 1 : I am planning to store a bit in my sqlite DB which notes that whether user signed in through any social network, if he done then go ahead. Don't open login page multiple times and directly give user access to other pages. Problem with this approach is that if i want user to publish on his wall then i need to get him log in again before publishing (if session token expires). Rest seems fine. Also i will provide him a sign out button with which i will clear this bit for next time login.
What do you guys think about this approach? How other people does this in their apps with multiple activities. Assuming this approach works fine if we don't need to access facebook/google again and just need to get basic user data to let him login. Drawback, even he remove my app from his facebook/google account, i give him full access until he logout.
Method 2: Always on app start i check if facebook has session.isOpen() or myGoogleClient.isConnected(). If any of this gives true, i let user go in my app. Make sure with what network user logged in and show him log out button of that network. This check will only come when user restart his app. Once user login, does he always logged in or he see lot of login pages? I feel this approach is better.
Do i need to check for session open condition on each activity when transactioning through activities?
Any suggestions what approach is used by different apps. I want my app to be accessed for data in offline mode, but still let user access online feature when he is online.
Even when he is logged in with google, i want him to publish on his wall with facebook login, so will ask him to do so if he clicks on publish button, this way at times i have both logins and will chose any on them.
Please show me directions. I tried to find this on net and reached to above conclusions, but not able to finalize on right approach.

Facebook Android SDK, prompt user authentication to switch sessions

This is kinda hard to explain. I'm building an application on android which is supposed to be used in a meeting in like a "stand" so people would submit some feedback after the meeting. Please notice there's a bunch of people who is going to use this application on the same device.
The application is gonna be used from different users on the same device and all of them are supposed to login with their Facebook account before continuing. For security reasons, I would love to have a way to distroy a Facebook session after a poll is submitted or simply, every time a new poll is issued, when the user is requiered to login on Facebook, I would like to force Facebook to prompt an authentication dialog (username and password again) even though there's an active session.
I've looked everywhere and I have found nothing. I know there's a way to request on Facebook a extensed permission to logout, but please notice this permission needs to be approved after logging in, so if a user, after logging in, just decide not to approve this permission, this session is going to be there until a browser is opened and a logout is performed from the Facebook site.
I've also thought on destroying a browser cookies but I don't know if is there such a permission on the android SDK to perform this.
Please, if any body has any idea on to get rid of this issue, I would really appreciate any suggestion or work around.
I believe you can do this with the Facebook SDK for Android 3.0 (beta).
You can turn off SSO (by using the SUPPRESS_SSO behavior) which should bring up a web dialog every time. And once the user is done interacting with your app, you can just call session.closeAndClearTokenInformation()
Cookies are not preserved when using the dialog login.

More advanced android facebook example

I'm having some problems with facebook integration on my android app. I've looked at the examples that come with the api and i can do the things shown in those ok. But i'm having problems with other things such as getting single sign on to work properly, authentication across multiple activities in the app and loading a facebook page (non-api call) without being asked to log in again.
Anyone have examples that show these?
When making API calls, you usually need to include the access_token parameter that was issued when the user authenticated. This is how facebook knows who you are when you make requests.
Similarly, when loading facebook pages (not using the API), you have to remember to send the cookies Facebook sent when the user logged in. Normally the browser keeps track of these automatically, but in your program or app you might have to handle them manually.
I don't have experience with Android specifically, and I don't know what you're using to load and render facebook pages, but knowing how facebook is keeping track of logged-in users should give you an idea of where to start. A google search or two should get you on your way.
Go to facebook.java class and change package name com.facebook.katana to com.facebook.katanaaa or any one of your own choice. This worked for me .

Categories

Resources