2016-08-31 15 views
1

私はサーバーからツイートを読み込んでいます。さえずるJSONは正しくて来て、私はTWTRTweetViewがプロフィール画像を読み込んでいません

TWTRTweet* t = [[TWTRTweet alloc] initWithJSONDictionary:tweetDict]; 
[_tweetView configureWithTweet:t]; 

を行うなど

"profile_background_color" = C0DEED; 
"profile_background_image_url" = "http://abs.twimg.com/images/themes/theme1/bg.png"; 
"profile_background_image_url_https" = "https://abs.twimg.com/images/themes/theme1/bg.png"; 
"profile_background_tile" = 0; 
"profile_image_url" = "http://pbs.twimg.com/profile_images/blahblahb/blahblah.jpg"; 
"profile_image_url_https" = "https://pbs.twimg.com/profile_images/blahblahblah/blahblah.jpg"; 
"profile_link_color" = 0084B4; 
"profile_sidebar_border_color" = C0DEED; 
"profile_sidebar_fill_color" = DDEEF6; 
"profile_text_color" = 333333; 
"profile_use_background_image" = 1; 

として、すべての正しいフィールドを持っており、すべてがプロフィール画像を除いて正しく表示されています。それはちょうど空白の灰色の長方形です。

答えて

1

あなたは、プロフィール画像を読み込むためにログインする必要があります。私はほとんどの人がtwitter apiから直接つぶやきをロードし、すでに認証されているので、大きな問題ではないと推測しています。私はサーバにtwitter apiを使ってキャッシュして、iOSクライアントにつぶやきを送っているので、クライアントは認証されませんでした。修正は私のアプリデリゲート

import <TwitterKit/TwitterKit.h>

//in app:didFinishLaunchingWithOptions: 
[[Twitter sharedInstance] startWithConsumerKey:@"****" consumerSecret:@"****"]; 
に次のように入れていました
関連する問題