Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem to get SocialShareState with dialog for Android. #2

Closed
YN-Ohtsuki opened this issue Aug 15, 2016 · 5 comments
Closed

Problem to get SocialShareState with dialog for Android. #2

YN-Ohtsuki opened this issue Aug 15, 2016 · 5 comments

Comments

@YN-Ohtsuki
Copy link

YN-Ohtsuki commented Aug 15, 2016

I have a problem to get callback status of SocialShareStateSuccess for Android with Dialog.
sdkbox::ShareListener cannot get status when I use "sdkbox::SocialShareInfo showDialog = true" for Android.

I have the following setting and I can get status of SocialShareStateSuccess for iOS (without fabric API).
For Facebook share (sdkbox::SocialShareInfo showDialog = false).
For Twitter share (sdkbox::SocialShareInfo showDialog = true).

For Android build, I can get status callback of SocialShareStateSuccess for Facebook share (sdkbox::SocialShareInfo showDialog = false).

I cannot get status callback of SocialShareStateSuccess for Twitter share (sdkbox::SocialShareInfo showDialog = true).
I can post to Twitter but I cannot get the status callback from Twitter.

Without the dialog, I cannot even post due to the following error.

AndroidRuntime: FATAL EXCEPTION: main
Process: com.mydomain.myapp, PID: 5566
java.lang.NoSuchMethodError: No interface method update(Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Double;Ljava/lang/Double;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Lcom/twitter/sdk/android/core/Callback;)V in class Lcom/twitter/sdk/android/core/services/StatusesService; or its super classes (declaration of 'com.twitter.sdk.android.core.services.StatusesService' appears in /data/app/com.mydomain.myapp/base.apk:classes10.dex)
at com.sdkbox.plugin.PluginShareTwitterConnector.shareRequest(PluginShareTwitterConnector.java:184)
at com.sdkbox.plugin.PluginShareTwitterConnector.access$200(PluginShareTwitterConnector.java:28)
at com.sdkbox.plugin.PluginShareTwitterConnector$2.run(PluginShareTwitterConnector.java:95)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5253)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.

Do you have any idea?

@hugohuang1111
Copy link
Contributor

hugohuang1111 commented Aug 17, 2016

  • can't get SocialShareStateSuccess for Twitter share(dialog=true)

    twitter composer will not send tweet result event

https://twittercommunity.com/t/cannot-receive-broadcast-after-compose-a-tweet-by-tweetcomposer/59810/2

  • No interface method update error when twitter share(dialog=false)

    how can i reproduce this
    i use this cpp sample to try, but can't reproduce.

@YN-Ohtsuki
Copy link
Author

I can post to Twitter with Share Dialog menu without any error and without callback (Unfortunately).
However, when I try to Share without dialog, I have the following error.

com.sdkbox.sample.share.cpp E/Twitter: Unexpected response: {"request":"/1.1/statuses/update.json","error":"Read-only application cannot POST."}
java.lang.NullPointerException: Attempt to get length of null array
at com.twitter.sdk.android.core.Callback.failure(Callback.java:45)
at retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5253)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
08-18 09:25:21.122 6618-6703/com.sdkbox.sample.share.cpp D/cocos2d-x debug info: SharePlugin::onShareState fail, error:share fail:com.twitter.sdk.android.core.TwitterApiException: 401 Authorization Required

@hugohuang1111
Copy link
Contributor

@YN-Ohtsuki
Copy link
Author

I confirmed that with my Twitter app key and secret, I can share with iOS build without dialog(though I cannot share screenshot). So, I think our Twitter app settings are OK and the problem is due to our fabric api key, though it shows the permission is readwrite on the fabric site.

@hugohuang1111
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants