0
我試過xamarin.iOS的樣品上http://docs.xamarin.com/guides/ios/platform_features/introduction_to_the_social_framework/SLRequest用C#在Xamarin.iOS項目返回代碼:215壞認證
但
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(); });
}
});
}
};
這SLRequest返回215碼;錯誤的身份驗證。
我不知道爲什麼。
我想要做的就是獲取特定用戶的時間線,如果您對此有所瞭解,請幫助我。
您是否在「設置」應用中設置了Twitter身份驗證設置?你是否試圖從模擬器或設備上做到這一點? – Jason
謝謝傑森,是的,我在我的iOS模擬器中設置了我的社交帳戶設置應用程序,我可以發佈推文和臉書,但無法獲得時間表。 –