2015-02-09 3 views
-4

Я использовал мое приложение социальных сетей и Twitter. Как получить изображение профиля пользователя в связанном и Twitter iOS?Как подключиться Linkedin и Twitter через профиль пользователя iOS?

NSString *profileImageURLString = [twitteruser valueForKey:@"profile_image_url"]; 
    NSURL *profileUrl = [NSURL URLWithString:profileImageURLString]; 
    self.twitterimage = [CIImage imageWithContentsOfURL:profileUrl]; 
+0

0 Какой код вы уже пытались? См. [Какие темы можно задать здесь?] (Http://stackoverflow.com/help/on-topic), [Как задать хороший вопрос?] (Http://stackoverflow.com/help/how -to-ask) и [Как создать минимальный, полный и проверенный пример] (http://stackoverflow.com/help/mcve). – Makyen

+0

NSString * profileImageURLString = [значение twitteruserForKey: @ "profile_image_url"]; NSURL * profileUrl = [NSURL URLWithString: profileImageURLString]; self.twitterimage = [CIImage imageWithContentsOfURL: profileUrl]; –

+0

Пожалуйста, * [изменить] вопрос *, чтобы включить ваш код, а не только в комментарии. – Makyen

ответ

0

Я получил этот код в профиле профиля пользователя twitter.

NSString * profileImageURLString = [значение twitteruserForKey: @ "profile_image_url"];

NSURL *url = [NSURL URLWithString:[profileImageURLString stringByAddingPercentEscapesUsingEncoding: 
            NSUTF8StringEncoding]]; 

twitterimage.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];          
Смежные вопросы