0

I tried a sample of xamarin.iOS on http://docs.xamarin.com/guides/ios/platform_features/introduction_to_the_social_framework/

but

twitterRequestButton.TouchUpInside += delegate {

            if (SLComposeViewController.IsAvailable (SLServiceKind.Twitter)) {

                var parameters = new NSDictionary ();
                var request = SLRequest.Create (SLServiceKind.Twitter,
                                                SLRequestMethod.Get,
                    new NSUrl ("http://api.twitter.com/1.1/statuses/public_timeline.json"),
                                                parameters);

                request.PerformRequest ((data, response, error) => {

                    if (response.StatusCode == 200) {
                        InvokeOnMainThread (() => {
                            resultsTextView.Text = data.ToString (); });

                    } else {
                        InvokeOnMainThread (() => {
                            resultsTextView.Text = "Error: " + response.StatusCode.ToString (); });
                    }
                });
            }
        };

This SLRequest returned 215 code; Bad Authenticated.

I don't know why.

All I want to do is to get specific user's time line so if you have an idea about this, please help me.

  • 1
    do you have Twitter auth settings setup in the Settings app? Are you trying to do this from the simulator or a device? – Jason Feb 23 '14 at 14:44
  • Thanks Jason, yeah I set my social account in setting app in my iOS simulator and I can post tweet and facebook but can't get timeline. – Takumi Takahashi Feb 24 '14 at 07:10
  • https://stackoverflow.com/questions/54807221/get-twitter-friends-list/54838712#54838712 – Naresh Feb 23 '19 at 06:28

1 Answers1

0

well -- for one thing statuses/public_timeline does not exist as an endpoint for version 1.1 of their API. Maybe you like https://dev.twitter.com/rest/reference/get/statuses/user_timeline or https://dev.twitter.com/rest/reference/get/statuses/home_timeline?

Bernie Habermeier
  • 2,580
  • 2
  • 22
  • 20