我需要使用fabric上传图片和状态。
状态已成功更新,但图片未上传
以下是代码:
final Card card = new Card.AppCardBuilder(TwitterActivity.this)
.imageUri(uriToUpload)
.iPhoneId("123456")
.iPadId("123456")
.build();
final Intent intent = new ComposerActivity.Builder(TwitterActivity.this)
.session(session)
.card(card)
.hashtags("#fabric1", "#twitter1")
.createIntent();
startActivity(intent);
但它会出现以下错误:
Post Tweet failed
com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 403
at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)