Fabric + REST API



I’m trying to use Fabric Auth and direct REST API to access user’s home timeline in Android.

I don’t want to use Twitter.getApiClient().getStatusesService().homeTimeline(...). It works well in my app, but I don’t like the way I get result from it(through Callback). And also I don’t want to use Extensions, because of the same reason.

I created retrofit service:
public interface TwitterService { String BASE_URL = "https://api.twitter.com/1.1/"; @GET("statuses/home_timeline.json") Call<List<Tweet>> getTimeline(); }
As an response I get: {"errors":[{"code":215,"message":"Bad Authentication data."}]}.

I suppose I need to add some parameters to the url which will identify specific user, but documentation under Parameters section doesn’t contain “user specific” parameters.

How can I resolve this issue?

Will appreciate any help. Thanks :slight_smile:


That error code indicates you haven’t properly signed the request. See authentication section on: https://dev.twitter.com/rest/public


This problem is solved.
What I needed to do to resolve this issue is just provide oauth parameters in the header. This section describes which parameters should be provided.

closed #5