403 Forbidden

android

#1

hello ,
i am trying to call tweets in my android code and 403 forbidden error is coming
here is my code :

    TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();
    SearchService search = twitterApiClient.getSearchService();

    search.tweets("from:PurgeGamers OR from:Fnggshka", null, null, null, null, null, null, null, null, null, new Callback<Search>() {
        @Override
        public void success(Result<Search> result) {
            list = result.data.tweets;
            FixedTweetTimeline timeline = new FixedTweetTimeline.Builder()
                    .setTweets(list)
                    .build();

            TweetTimelineListAdapter adapter = new TweetTimelineListAdapter.Builder(MainActivity.this)
                    .setTimeline(timeline)
                    .build();

            setListAdapter(adapter);
        }"

and here is the error :

System.err: com.twitter.sdk.android.core.TwitterApiException: 403 Forbidden
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
06-17 16:02:01.031 22362-22362/com.example.romin.twitterexample W/System.err: at java.lang.Thread.run(Thread.java:818)
06-17 16:02:02.729 22362-22401/com.example.romin.twitterexample W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning rea
d-only value.

i have already authorized my key and i was able to run SearchTimeline query but when i run this query 403 forbidden error is coming .so can anyone help on why this error is coming


#2

can anyone help me on why i am getting 403 forbidden error .i have already taken authentication


#3

I did some digging into this and it appears on your app that the keys have been re-generated recently. Is it possible that you’re still referencing the older values of your Twitter consumer key and secret and not the ones currently present on your Fabric dashboard?


#4

hello,
i took the authentication on 7th june . i generated my key from the twitter apps. but i am able to run the SearchTimeline query ,UserTimeline query with my key ,only getting 403 Forbidden in this query.
so do i need to take a new key for this query ?


#5

@rominv13 Do you have multiple versions of Retrofit in your app?

Also, are other searchTimelines working or just this one?


#6

No i dont have multiple version of retrofit
And yes i am able run query’s like SearchTimeline ,UserTimeline,CollectionTimeline
It throws this error only on this query