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 .
Related
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.
I want to use LinkedIn in my Android application. I am not sure whether it is right/doable or not but I want to integrate it without LinkedIn SDK. I meant to say, whenever user clicks on login button it should go to the web using webview and user will login there and it should come back. Then I should be able to access the minimal user information.
Just wanted to know whether it is possible or not!
Thank you
It's possible but you end up with a few issues.
If your app becomes successful you increase the chance of having expensive conversations with LinkedIn lawyers.
Essentially you'd be using a very unofficial and undocumented api which would be subject to change at any time.
If you're doing the project for yourself as research project or for your own internal business use then what you're looking for is to communicate between your native app and the webpage.
See search google with android javascript communicate with web page view
I have a designing problem and I don't fully understand facebook instructions.
I'm implementing an android app and I would like to get news from 2 facebook pages (public news).
I know that there is an access token, but I'm not sure how to get it for these 2 pages.
I imagined such solution:
Create my facebook app (Still my app access token is useless in this situation).
Ask clients (these 2 facebook pages) to use my app.
Then I could get their news. (?)
Unfortunately creating facebook app and giving necessary permissions is very time-consuming so I want to make sure that this solution is correct.
Or maybe is there a much better/faster solution?
Thank you for help!
I have seen several flavours of this question going around but nothing exactly specific nor answered so trying it myself.
I am trying to build a Facebook login experience via the browser into my Facebook-based app that will require the users to not remember their passwords as much as possible. This means that if
they log in via their desktop browser and are already logged in, it will only ask them to 'OK' the permissions
they log in from their mobile browser and are logged in via their respective native app (Android/iOS), it will simply redirect them to the native app, ask for the app permissions and redirect them back to the success page on the browser
they log in from any browser and are not currently logged onto Facebook in any form, they have to enter their password and authenticate (whether natively or via browser this does not matter)
I know how the first can be done - that is pretty straightforward using the JS SDK. The second point is the tougher bit.
I am aware of existing custom URL schemes for Android and iOS but nothing specifically really mentions how that can be used for authentication and/or authorisation of Facebook apps. Does anyone have any ideas on how this can be done?
Thanks!
In iOS use iOS facebook SDK. It will handle the login process effectively in different situations depending on the resources available. Check out this answer to know about different login flows
Integrating facebook
You're looking for Single Sign On behavior- in Facebook, use the native SDK, and instructions for setting up SSO. It includes entering your bundle id in the settings and setting up a referring url name (the name of your app usually). So what happens is- if you launch safari mobile, and log into facebook. Then, launch your app, with good integrated SSO. Then, it won't require you to login/pass, because it knows you've authenticated via browser. Same with Android.
I think what you are looking for (at least for Android) is starting an Intent on certain schema that will open Facebook app.
This is answered here Android facebook intent to show profile with class com.facebook.katana.ProfileTabHostActivity doesn't work any more
I followed the instructions in the android tutorial and registered 2 native android apps in facebook. I got the ID, and so far as I remember, I put the key in as well.
I'm having errors with it now, so I'm trying to get back in and verify that I put the correct value in for the key...but I cannot get to any page that holds that info. Most links that I've followed so far just take me back to my facebook "Your pages" page, which has my account page, and a page for each of the two apps I've already registered. No link anywhere in those app pages takes me to where the key value is registered.
Even trying to create another app entry, via the tutorial, and following this link:
https://www.facebook.com/developers/createapp.php
just takes me directly to:
http://www.facebook.com/browse/admined_pages/?id=1000.....
I can't imagine how this could be any more frustrating....
Found it. It was under known "bugs". Apparently they allowed people to create business facebook accounts, and register apps under those accounts...and then regretted doing it, and so silently disabled all app access through those accounts. Yay, thanks guys. Here is the url that describes the problem and where to go to assign your apps (via the ID) to your regular-human facebook account. http://developers.facebook.com/bugs/133607873418215