-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathreadme
More file actions
26 lines (19 loc) · 1 KB
/
readme
File metadata and controls
26 lines (19 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Sample shows how to use SSO with Facebook as well as Dialog Authentication. You will want to use Dialog Authentication when using plug-ins such as like, send, comments, etc.
To force Dialog only authentication, modify the Facebook.java file as such:
public void authorize(Activity activity, String[] permissions,
int activityCode, final DialogListener listener) {
boolean singleSignOnStarted = false;
mAuthDialogListener = listener;
// Prefer single sign-on, where available.
// if (activityCode >= 0) {
// singleSignOnStarted = startSingleSignOn(activity, mAppId,
// permissions, activityCode);
// }
// Otherwise fall back to traditional dialog.
if (!singleSignOnStarted) {
startDialogAuth(activity, permissions);
}
}
This forces the dialog, thus allowing the cookie and session to carry over to web views inside your app.
Dependencies
https://github.com/facebook/facebook-android-sdk