Comments (16)
Hi,
Just tried the same and didn't get an exception.
Few questions:
- Have you tried the regular flow, means accepting the permissions? Are you logged in after this?
- What are the permissions are you using?
- Have you changed the app_id, app_namespace to your app?
Thanks
from android-simple-facebook.
I think this is the similar issue with #21
from android-simple-facebook.
static Permissions[] permissions = new Permissions[] {
Permissions.BASIC_INFO,
Permissions.EMAIL,
Permissions.USER_BIRTHDAY,
Permissions.PUBLISH_ACTION
};
public static SimpleFacebook getSimpleFacebookInstance(Activity activity) {
if (mSimpleFacebook == null) {
SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder()
.setAppId(APP_ID)
.setPermissions(permissions)
.build();
mSimpleFacebook = SimpleFacebook.getInstance(activity);
mSimpleFacebook.setConfiguration(configuration);
return mSimpleFacebook;
} else {
return mSimpleFacebook;
}
}
That´s how I add my permissions and app id. My app id it´s the one from my fb app.
1. Have you tried the regular flow, means accepting the permissions? Are you logged in after this?
Yes I´ve tried it and works fine, only fails when I decline the permissions first.
2. What are the permissions are you using?
Posted above
3. Have you changed the app_id, app_namespace to your app?
I´ve done it, my app_id it´s the one from my fb app but I don't use a namespace.
By the way, thanks for the quick reply @sromku
from android-simple-facebook.
@yusufiga I´ve read that issue too, I considered commenting there but saw some differences so I´ve opened a new issue. Hope it doesn't matter so much.
It seems that even being two different errors the main issue could be the same. Maybe some request to the FB SDK gets stuck when some of this actions are made.
from android-simple-facebook.
@axierjhtjz Still can't reproduce the issue. But, I reproduced the issue of @yusufiga
Let's see if the solution for the first problem will handle this case. Be updated :)
from android-simple-facebook.
@sromku thank you, I´ll be watching both threads
from android-simple-facebook.
@sromku I´ve solved my issue, just changed my computer on the office and didn't update my key hashes. After updating them it works fine and the app asks for permissions again.
On the other hand I don't think that key hashes has nothing to do with accepting or declining read permissions, because it has nothing to do with the user interaction just Facebook app configuration. Do you think that it should go on onNotAcceptingPermissions or maybe it should throw onBadAppConfiguration?
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): -----
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): ERROR: SessionStatusCallback: exception=
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): com.facebook.FacebookOperationCanceledException: ApiException:Key hash *********************************** does not match any stored key hashes.
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.facebook.Session.handleAuthorizationResult(Session.java:1043)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.facebook.Session.onActivityResult(Session.java:543)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.sromku.simple.fb.SimpleFacebook.onActivityResult(SimpleFacebook.java:762)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.irontec.fragments.LoginCircles.onActivityResult(LoginCircles.java:192)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.Activity.dispatchActivityResult(Activity.java:5390)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.ActivityThread.deliverResults(ActivityThread.java:3178)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3225)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.ActivityThread.access$1100(ActivityThread.java:140)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1275)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.os.Handler.dispatchMessage(Handler.java:99)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.os.Looper.loop(Looper.java:137)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at android.app.ActivityThread.main(ActivityThread.java:4898)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at java.lang.reflect.Method.invokeNative(Native Method)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at java.lang.reflect.Method.invoke(Method.java:511)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
10-31 12:40:47.764: E/com.sromku.simple.fb.SimpleFacebook(12285): at dalvik.system.NativeStart.main(Native Method)
10-31 12:40:47.769: D/LoginCircles(12285): No permisions
10-31 12:40:47.774: I/com.sromku.simple.fb.SimpleFacebook(12285): -----
If the Logger utility can log that kind of error it would be nice to have an exception.
Thanks @sromku and @yusufiga for all the help and for getting so involved.
from android-simple-facebook.
@axierjhtjzcan can you try to check my steps on #21 ? Thanks ?
from android-simple-facebook.
I´ll do it now, will report with the result
from android-simple-facebook.
@yusufiga that´s not the problem, with bad key hashes you can't even get to accept publish permissions (2nd dialog) as you stated on point 3.
3 accept read permissions and decline publish permissions
Sorry for not being of much help.
from android-simple-facebook.
No problem thanks for trying :)
from android-simple-facebook.
@axierjhtjz great to know that the problem solved.
Regarding bad configuration, you are right, the library can check this. I just wonder if onBadAppConfiguration
callback method should be in general flow. I mean, this error can happen only in dev time and once you configure everything correct, then it shouldn't happen anymore.
I think, that it is better to add some kind of validation function or to wrap the exception and throw something more self explaining. And, being able to correct it in dev time quickly.
@yusufiga I still on #21 issue.
from android-simple-facebook.
That´s nice.
You´re right, maybe a wrapper for the exception should be enough. That won't interfere with the user flow.
from android-simple-facebook.
👍
Updated this issue with label: enhancement
from android-simple-facebook.
@axierjhtjz The issue of asking for the second time was resolved. Please use latest code and you can check latest major update notes: #103.
The new stuff about permissions is explained here: https://github.com/sromku/android-simple-facebook#permissions
Thanks.
from android-simple-facebook.
Thanks @sromku. I'll take a look and will use it for sure on the next project!
from android-simple-facebook.
Related Issues (20)
- getPhotos() returning 0 always
- Crash reported in google play
- Image feed size
- SSL Handshake Exception OnProfileListener
- Publish feed with dialog: sometimes opens dialog, sometimes not
- Get Response Object after publish
- Get events information
- Mutual friends
- Album Responding Only 3 values in simple-fb:4.1.1.
- not getting the Friends Requests
- Argument 'activity' cannot be null
- Posting to pages HOT 2
- AutoFirma no abre en Edge
- Cant get data from Post HOT 2
- apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
- Message text for the feed is not getting displayed on the post
- Configuration Error After Upgrade Firebase Version HOT 5
- Some of the album methods like getCount(), getCoverPhotoIs() are not working, can anyone help me with this, why is it so
- GetPhotos not working
- Photo instance is null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-simple-facebook.