2016-04-26 11 views
-3

Twitterの統合から電子メールアドレスを取得するプロセスは何ですか?私は布でそれをやった。電子メールアドレスを取得するために、私はhttps://support.twitter.com/forms/platformで与えられたすべての指示に従った。また、Twitterからメールを受け取ることもできます。 今後の手続きをお手伝いできますか? 私はこのコードに従います。Twitterの統合から電子メールアドレスを取得しないについて

[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error) { 
     if (session) { 
      NSLog(@"signed in as %@", [session userName]); 
      NSLog(@"signed in as %@", [session userID]); 
      [self usersShow:[session userID]]; 


      TWTRAPIClient *client = [TWTRAPIClient clientWithCurrentUser]; 

      NSURLRequest *request = [client URLRequestWithMethod:@"GET" 
                  URL:@"https://api.twitter.com/1.1/account/verify_credentials.json" 
                 parameters:@{@"include_email": @"true", @"skip_status": @"true"} 
                  error:nil]; 

      [client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 
       NSLog(@"tMail%@",response); 
      }]; 


     } else { 
      NSLog(@"error: %@", [error localizedDescription]); 
     } 
    }]; 

私はこの応答を得た:あなたの開発者アカウントを使用して

  { 
"contributors_enabled" = 0; 
"created_at" = "Wed Nov 30 11:39:55 +0000 2011"; 
"default_profile" = 1; 
"default_profile_image" = 0; 
description = "Software developer"; 
entities =  { 
    description =   { 
     urls =    (
     ); 
    }; 
}; 
"favourites_count" = 2; 
"follow_request_sent" = 0; 
"followers_count" = 6; 
following = 0; 
"friends_count" = 12; 
"geo_enabled" = 0; 
"has_extended_profile" = 0; 
id = 424967484; 
"id_str" = 424967484; 
"is_translation_enabled" = 0; 
"is_translator" = 0; 
lang = en; 
"listed_count" = 0; 
location = "Nokha, Rajasthan"; 
name = "Muraree pareek"; 
notifications = 0; 
"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_banner_url" = "https://pbs.twimg.com/profile_banners/424967484/1432039697"; 
"profile_image_url" = "http://pbs.twimg.com/profile_images/1667595088/Image0236_normal.jpg"; 
"profile_image_url_https" = "https://pbs.twimg.com/profile_images/1667595088/Image0236_normal.jpg"; 
"profile_link_color" = 0084B4; 
"profile_sidebar_border_color" = C0DEED; 
"profile_sidebar_fill_color" = DDEEF6; 
"profile_text_color" = 333333; 
"profile_use_background_image" = 1; 
protected = 0; 
"screen_name" = Murareepareek; 
"statuses_count" = 3; 
"time_zone" = "New Delhi"; 
url = "<null>"; 
"utc_offset" = 19800; 
verified = 0; 
} 
+0

uはウル試したコード –

+0

私はあなたが私はclientWithCurrentUserの問題を取得するコード –

+0

質問を編集し表示することができます。それは何をガイドしてください、私はこれを何か別のクラスをインポートする必要がありますか教えてください。 – PSS

答えて

2

I think you probably swept your eyes across this a bit too quick

1)あなたは、特定の取得できるように、あなたのアプリを「ホワイトリスト」にTwitterへの要求を提出しなければなりません人のメール。これはセキュリティチェックの一種であり、米国のユーザーデータが第三者に不正に販売されているため、Twitterは強制的な広告、スパム、ユーザーに迷惑をかける可能性のあるメールアドレスからユーザーを保護します。

https://dev.twitter.com/rest/reference/get/account/verify_credentials272 

は「要求ユーザの電子メールアドレスは、Twitterでホワイトリストに登録されるように、あなたのアプリケーションが必要です。アクセスを要求するには、このフォームを使用してください。」 フォーム:https://support.twitter.com/forms/platform394

This form will get your app whitelisted based on a reply within 1-2 hrs or days depending on Twitter!

が、これはあなたのお役に立てば幸い!

関連する問題