Android Fabric Twitter App card post failed - 403 Forbidden

android
cards

#1

I have been trying to post an app card programmatically from android app. but its failing.

This is the error statcktrace:
Post Tweet failed com.twitter.sdk.android.core.TwitterApiException: 403 Forbidden
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

I assume this is due to conflict of using squareup.com libraries seperately for the project. Following are the squareup libraries Im using for this project

compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.picasso:picasso:2.5.2'

please help me figure out this problem and fix it.


#2

(moving across to the Fabric Twitter Kit category)


#3

Hey @SinanShoukath,

Have you applied and been whitelisted for posting App cards? Check out the requirements here: https://docs.fabric.io/android/twitter/compose-tweets.html#requirements

-Mike


#4

Hey @bonnell,

I have applied for whitelisting and its approved. But I’m facing another problem now. I try to post an app card from my android app and it posted successfully. When I gone through my twitter profile the app card is not showing, only text is shown there. Why is this happening? Please help.


#5

Can you share the tweet where this isn’t working correctly for you?


#6

Its working now. The problem was with the image I had attached. The image size was not as given in the requirements. When I put the image of required sizes the card posted and displayed. Thanks for your time and effort.


#7