Step 1: Create a new application of Twitter from
app registration and you will see the information as below.


   It contains two key values we will need.

  Consumer key  uc5Ag3Oog5Ot3lWtt4w91Q  Consumer secret  ZFcLlWfQEq5poFDpFuTRHAVdHWPVctQYu6wXM2qpTQ   Step 2: Download 
Twitter SDK

  Step 3: Add Twitter SDK into your project.   Step 4: Add
libxml2.dylib into Framework   Step 5: Add
$(SDKROOT)/usr/include/libxml2 in "Header Search Paths"
 BF4101FBB25BA32D91BB14BE86C04B      Step 6: Replace key values with previous what we got in TwitterControl.m    #define kOAuthConsumerKey @ "uc5Ag3Oog5Ot3lWtt4w91Q"   #define kOAuthConsumerSecret @"ZFcLlWfQEq5poFDpFuTRHAVdHWPVctQYu6wXM2qpTQ"

   Step 7: Integrate Twitter SDK with your project  

  • Add #import "TwitterControl.h" and TwitterControlProtocol in xxxx.h
  • Implement TwitterControlProtocol

  -( void)didPostComplete:( TwitterControl *)control success:( BOOL)result   {       [control autorelease];   } 

  • Post message to twitter

[ TwitterControl   postMessage : self   msg : @"your message" ];

Reference from
here

arrow
arrow
    全站熱搜

    戮克 發表在 痞客邦 留言(0) 人氣()