[twitter-dev] Twitter integration for IPhone App

2011-03-01 Thread Battan Amit
Hi


I am working on a iphone application in which I will integrate the twitter
I have questions


   - What is different between oAuth and xAuth? Which one should I use?
   - I want when I login into my application then user's twitter account
   automatically logged in if he/she provide the authentic detail already. Is
   it possible, if then using oAuth or xAuth?
   - Is any twitter official iOS sdk for twitter, like MGTwitterEngine, if
   it then please provide the source if it is free?


Thanks
Amit

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Twitter Error While Authenticating ..IPhone Application

2011-03-02 Thread Battan Amit
for xAuth I think we have to give the itune URL and other detail of
application
As my application is in developing stage ... So How I will get it.

OR

And for now how I am using oAuth in MGTwitterEngine



AB



On 2 March 2011 17:19, Rich rhyl...@gmail.com wrote:

 Have you applied for xAuth access, oAuth is enabled for clients by
 default but xAuth you have to apply for.

 On Mar 1, 12:53 pm, Battan Ror batta...@gmail.com wrote:
  Hi
 
  I am using MGTwitterEngine in Iphone application
 
  But I am getting error in log of function
  - (void)requestFailed:(NSString *)connectionIdentifier withError:
  (NSError *)error
  {
  NSLog(@Twitter Request failed for connectionIdentifier = %@,
  error = %@ (%@),
connectionIdentifier,
[error localizedDescription],
[error userInfo]);
 
  }
 
  Error Log
 
  Twitter Request failed for connectionIdentifier =
  8E192CD3-35E5-46C8-86E9-1EADEE38B6E8, error = The operation couldn’t
  be completed. (HTTP error 401.) ({
  body = ?xml version=\1.0\ encoding=\UTF-8\?\nhash\n
  request/oauth/access_token/request\n  errorClient application is
  not permitted to use xAuth./error\n/hash\n;
  response = NSHTTPURLResponse: 0x603b6a0;
 
  })
 
  following code in controller class
  -(IBAction)twitterBtnAct:(id)sender{
  // Put your Twitter username and password here:
  NSString *username = @myusername;
  NSString *password = @mypassword;
 
  NSString *consumerKey = @b2jD5AXJewSNfmCBfzvlw;
  NSString *consumerSecret =
  @ceqEECJalqtVUnxl8sNQxrh5dXGUvo9cg4HxKNn6g;
 
  // Most API calls require a name and password to be set...
  if (! username || ! password || !consumerKey || !consumerSecret) {
  NSLog(@You forgot to specify your username/password/key/
  secret in AppController.m, things might not work!);
  NSLog(@And if things are mysteriously working without
 the username/
  password, it's because NSURLConnection is using a session cookie from
  another connection.);
  }
 
  // Create a TwitterEngine and set our login details.
  twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
  [twitterEngine setUsesSecureConnection:NO];
  [twitterEngine setConsumerKey:consumerKey secret:consumerSecret];
  // This has been undepreciated for the purposes of dealing with
  Lists.
  // At present the list API calls require you to specify a user
  that owns the list.
  [twitterEngine setUsername:username];
 
  [twitterEngine getXAuthAccessTokenForUsername:username
  password:password];
 
  }
 
  #pragma mark Twitter methods
  #pragma mark MGTwitterEngineDelegate methods
  - (void)accessTokenReceived:(OAToken *)aToken forRequest:(NSString
  *)connectionIdentifier
  {
  NSLog(@Twitter Access token received! %@,aToken);
  token = [aToken retain];
  [self runTests];
 
  }
 
  - (void)requestSucceeded:(NSString *)connectionIdentifier
  {
  NSLog(@Twitter Request succeeded for connectionIdentifier = %@,
  connectionIdentifier);
 
  }
 
  - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString
  *)connectionIdentifier
  {
  NSLog(@Twitter Got statuses for %@:\r%@, connectionIdentifier,
  statuses);
 
  }
 
  - (void)directMessagesReceived:(NSArray *)messages forRequest:
  (NSString *)connectionIdentifier
  {
  NSLog(@Twitter Got direct messages for %@:\r%@,
  connectionIdentifier, messages);
 
  }
 
  - (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString
  *)connectionIdentifier
  {
  NSLog(@Twitter Got user info for %@:\r%@, connectionIdentifier,
  userInfo);
 
  }
 
 

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Twitter integration for IPhone App

2011-03-03 Thread Battan Amit
I found some links from twitter site MGTwitterEngine etc.

and use it.

this is supporting both xAuth and oAuth as per its documentation
and try it using xAuth as a function calling named
getXAuthAccessTokenForUsername

But my application is in developing stage .. and twitter not approving it ..
they will approve it after release...


I am not able to use oAuth using MGTwitterEngine

Can you help me...

Even I am not able to use oAuth version
http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/comment-page-1/

I can update my status using it...

But not able do any thing else

I try
[twitterObj getUserInformationForEmail:@batta...@gmail.com];

then getting error

Request 9EF8DE73-6E04-46F1-9D90-484F90FCA44F failed with error: Error
Domain=HTTP Code=404 The operation couldn’t be completed. (HTTP error
404.)


Request 016DB024-1BFB-4E9B-8734-3FFCCB93D6E4 failed with error: Error
Domain=HTTP Code=403 The operation couldn’t be completed. (HTTP error
403.)






AB



On 3 March 2011 17:49, Bess bess...@gmail.com wrote:

 No Official Twitter iOS SDK.

 You want better user experience on iOS app use xAuth. I will be
 releasing book chapter on iOS app soon with code example.

 On Mar 1, 4:56 am, Battan Amit batta...@gmail.com wrote:
  Hi
 
  I am working on a iphone application in which I will integrate the
 twitter
  I have questions
 
 - What is different between oAuth and xAuth? Which one should I use?
 - I want when I login into my application then user's twitter account
 automatically logged in if he/she provide the authentic detail
 already. Is
 it possible, if then using oAuth or xAuth?
 - Is any twitter official iOS sdk for twitter, like MGTwitterEngine,
 if
 it then please provide the source if it is free?
 
  Thanks
  Amit

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: IPhone + Twitter + LinkedIn Error : Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

2011-03-14 Thread Battan Amit
I done one thing that is ... I remove the library files of linkedin sdk..
and add the source files of it with oAuth files from twiiter sdk... then it
works ok for linkedin http://i.imgur.com/cXLXU.png
http://i.imgur.com/ntV9G.png then I integrate all twitter code then
project run ok without error but for twitter login interface it shows PAGE
NOT FOUND ..http://i.imgur.com/8a1ua.png



AB



On 12 March 2011 11:44, Bess bess...@gmail.com wrote:

 First of all it is difficult to identify errors esp you don't have the
 source code. However the stockoverflow discussion was good enough to
 point out the general problems.

 ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/pratgupta/
 Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/
 Debug-iphonesimulator/libLinkedInClientLibrary.a(Base64Transcoder.o)
 and /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter
 +OAuth/Libraries  Headers/libOAuth.a(Base64Transcoder.o)

 Problem is: duplicate symbol

 It occurs on _EstimateBas64EncodedDataSize from LinkedinClientLibrary
 in libLinkedInClientLibrary.a(Base64Transcoder.o) and Twitter+OAuth in
 libOAuth.a(Base64Transcoder.o).

 Note: LinkedIn library and Ben Gottlieb's Twitter client include the
 same OAuthConsumer code. It is duplicated. libLinkedInClientLibrary
 and libOAuth both symbolicate the same method
 '_EstimateBas64EncodedDataSize'. Check your #imports.

 Just do a search within your Xcode project on
 _EstimateBas64EncodedDataSize. Find out where the duplicated methods.
 Determine which one you should remove.

 On Mar 11, 4:56 am, Battan Ror batta...@gmail.com wrote:
  HI All
 
  I am using MGTwitterEngine oAuth and LinkedIn iOS sdk in my Iphone
  application with facebook-ios-sdk
 
  TwitterEngine :https://github.com/bengottlieb/Twitter-OAuth-iPhone
 
  LinkedInIphone :https://github.com/ResultsDirect/LinkedIn-iPhone
 
  Both integrated well separately, But when I have used both in
  application then error coming
 
  FB + Twitter = working well
  FB + LinkedIn = Working Well
  FB + Twitter + LinkedIn = Not Working
 
  and giving error
 
  Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/
  bin/gcc-4.2 failed with exit code 1
 
  Please help me where I am wrong.
 
  Error Transcript Text File
 
  Build butterfli of project butterfli with configuration Debug
 
  Ld build/Debug-iphonesimulator/butterfli.app/butterfli normal i386
  cd /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli
  setenv MACOSX_DEPLOYMENT_TARGET 10.6
  setenv PATH /Developer/Platforms/iPhoneSimulator.platform/Developer/
  usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
  /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
  gcc-4.2 -arch i386 -isysroot /Developer/Platforms/
  iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -L/
  Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-
  iphonesimulator -L/Users/pratgupta/Desktop/Settinglinkedin/
  10_mar_butterfli/Twitter+OAuth/Libraries  Headers -F/Users/pratgupta/
  Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator -
  filelist /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/
  build/butterfli.build/Debug-iphonesimulator/butterfli.build/Objects-
  normal/i386/butterfli.LinkFileList -mmacosx-version-min=10.6 -all_load
  -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework
  UIKit -framework CoreGraphics -lOAuth -lxml2 /Users/pratgupta/Desktop/
  Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/Debug-
  iphonesimulator/libLinkedInClientLibrary.a -o /Users/pratgupta/Desktop/
  Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator/
  butterfli.app/butterfli
 
  ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/pratgupta/
  Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/
  Debug-iphonesimulator/libLinkedInClientLibrary.a(Base64Transcoder.o)
  and /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter
  +OAuth/Libraries  Headers/libOAuth.a(Base64Transcoder.o)
  collect2: ld returned 1 exit status
  Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/
  bin/gcc-4.2 failed with exit code 1
 
  Some discussion on the Issue herehttp://
 stackoverflow.com/questions/5259747
 
  Amit Battan

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: IPhone + Twitter + LinkedIn Error : Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

2011-03-14 Thread Battan Amit
*Solved *


solved now...I have given the same key and secret to both linkedin and
twitter ..after changing them it works


AB



On 14 March 2011 11:55, Battan Amit batta...@gmail.com wrote:

 I done one thing that is ... I remove the library files of linkedin sdk..
 and add the source files of it with oAuth files from twiiter sdk... then it
 works ok for linkedin http://i.imgur.com/cXLXU.png
 http://i.imgur.com/ntV9G.png then I integrate all twitter code then
 project run ok without error but for twitter login interface it shows PAGE
 NOT FOUND ..http://i.imgur.com/8a1ua.png


 
 AB




 On 12 March 2011 11:44, Bess bess...@gmail.com wrote:

 First of all it is difficult to identify errors esp you don't have the
 source code. However the stockoverflow discussion was good enough to
 point out the general problems.

 ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/pratgupta/
 Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/
 Debug-iphonesimulator/libLinkedInClientLibrary.a(Base64Transcoder.o)
 and /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter
 +OAuth/Libraries  Headers/libOAuth.a(Base64Transcoder.o)

 Problem is: duplicate symbol

 It occurs on _EstimateBas64EncodedDataSize from LinkedinClientLibrary
 in libLinkedInClientLibrary.a(Base64Transcoder.o) and Twitter+OAuth in
 libOAuth.a(Base64Transcoder.o).

 Note: LinkedIn library and Ben Gottlieb's Twitter client include the
 same OAuthConsumer code. It is duplicated. libLinkedInClientLibrary
 and libOAuth both symbolicate the same method
 '_EstimateBas64EncodedDataSize'. Check your #imports.

 Just do a search within your Xcode project on
 _EstimateBas64EncodedDataSize. Find out where the duplicated methods.
 Determine which one you should remove.

 On Mar 11, 4:56 am, Battan Ror batta...@gmail.com wrote:
  HI All
 
  I am using MGTwitterEngine oAuth and LinkedIn iOS sdk in my Iphone
  application with facebook-ios-sdk
 
  TwitterEngine :https://github.com/bengottlieb/Twitter-OAuth-iPhone
 
  LinkedInIphone :https://github.com/ResultsDirect/LinkedIn-iPhone
 
  Both integrated well separately, But when I have used both in
  application then error coming
 
  FB + Twitter = working well
  FB + LinkedIn = Working Well
  FB + Twitter + LinkedIn = Not Working
 
  and giving error
 
  Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/
  bin/gcc-4.2 failed with exit code 1
 
  Please help me where I am wrong.
 
  Error Transcript Text File
 
  Build butterfli of project butterfli with configuration Debug
 
  Ld build/Debug-iphonesimulator/butterfli.app/butterfli normal i386
  cd /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli
  setenv MACOSX_DEPLOYMENT_TARGET 10.6
  setenv PATH /Developer/Platforms/iPhoneSimulator.platform/Developer/
  usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
  /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
  gcc-4.2 -arch i386 -isysroot /Developer/Platforms/
  iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -L/
  Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-
  iphonesimulator -L/Users/pratgupta/Desktop/Settinglinkedin/
  10_mar_butterfli/Twitter+OAuth/Libraries  Headers -F/Users/pratgupta/
  Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator -
  filelist /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/
  build/butterfli.build/Debug-iphonesimulator/butterfli.build/Objects-
  normal/i386/butterfli.LinkFileList -mmacosx-version-min=10.6 -all_load
  -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework
  UIKit -framework CoreGraphics -lOAuth -lxml2 /Users/pratgupta/Desktop/
  Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/Debug-
  iphonesimulator/libLinkedInClientLibrary.a -o /Users/pratgupta/Desktop/
  Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator/
  butterfli.app/butterfli
 
  ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/pratgupta/
  Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/
  Debug-iphonesimulator/libLinkedInClientLibrary.a(Base64Transcoder.o)
  and /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter
  +OAuth/Libraries  Headers/libOAuth.a(Base64Transcoder.o)
  collect2: ld returned 1 exit status
  Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/
  bin/gcc-4.2 failed with exit code 1
 
  Some discussion on the Issue herehttp://
 stackoverflow.com/questions/5259747
 
  Amit Battan

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk




-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues

[twitter-dev] Twitter-oAuth-IPhone : Which function on Login Success : twits of followings

2011-03-18 Thread Battan Amit
Hi All

I am using Twitter-oAuth-IPhone
https://github.com/bengottlieb/Twitter-OAuth-iPhone

Login using this code

if(![twitterObj isAuthorized]){
UIViewController *controller = [SA_OAuthTwitterController
controllerToEnterCredentialsWithTwitterEngine:twitterObj
delegate:self];
NSLog(@twitter 1);

if (controller){
NSLog(@twitter 2);
[[self objectForKey:@self] presentModalViewController:
controller animated: YES];
}
}

I have 2 questions

   - I want to do some code on login success and login fail in which
   function should I code
   - Which function return me the my home page updates i.e twits of
   followings

*Amit Battan*

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Direct Message to more than one person

2011-04-12 Thread Battan Amit
Hi


I want to send direct message to more than one person with a single call

I am using MGTwitterEngine

and calling function like this
[requestDict setObject:@direct_message forKey:[twitterObj
sendDirectMessage:@this is test from iphone app to:@user_id]];

this is sending ok

but am not able to send it to multiple people , how can I do this
I tried it with comma separated user_ids but not works


Thanks
Amit Battan

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk