bannerColor WARNING_YELLOW templateName stackForums

Update status via iphone app

29 posts / 0 new
Last post
Mohammed Ameen's picture
Joined: 2010-08-09
Aug 10, 2010
Update status via iphone app

Any one have sdk for iphone, or know how to update status in objective-c ?thanks

Mohammed Ameen's picture
Joined: 2010-08-09
Aug 10, 2010

I use this sdk http://github.com/ResultsDirect/LinkedIn-iPhoneread readme file before use it

Joined: 2010-08-11
Aug 26, 2010

I had used this library but i could not add them into my project. tell me why?Thanks.

Mohammed Ameen's picture
Joined: 2010-08-09
Aug 27, 2010

first you should link library to your iphone app1 -  make folder named "libs" in the parent folder of ".xcodeproj" file2 - copy "LinkedInClientLibrary" & "OAuthConsumeriPhoneLib" to "libs/linkedin/"3-  drag and drop file "LinkedInClientLibrary.xcodeproj"  in  "LinkedInClientLibrary" folder to you project "files tree on left side" to group frameworks in  xcode 4- select   "LinkedInClientLibrary.xcodeproj" that you dropped in the right side marke checkbox " LinkedInClientLibrary.a"5- open tragets node  "files tree on left side" doubel click on  your output  file that open a new dialog6- on general tab add   "LinkedInClientLibrary.xcodeproj" to direct dependenices 7 - on build tab      a- add "$(SRCROOT)/Libs/linkedin/LinkedInClientLibrary" to "Header search paths"     b- add "$(SRCROOT)/Libs/linkedin/OAuthConsumeriPhoneLib"  to "user header search paths"seconde use lib1- in shareviewController.h file#import "RDLinkedInEngine.h"#import "RDLinkedInAuthorizationController.h" @interface shareviewController : UIViewController <RDLinkedInEngineDelegate,RDLinkedInAuthorizationControllerDelegate> {RDLinkedInEngine* rdEngine;} -(IBAction) linkedinShare;  // this function will call linkedin library@end 2- shareviewController.m file #import "shareviewController.h" static NSString *const LI_kOAuthConsumerKey     = @"xxxxxxxxx";static NSString *const LI_kOAuthConsumerSecret  = @"xxxxxxxx"; @implementation shareviewController -(IBAction) linkedinShare{ working_lbl.hidden = FALSE; working_lbl.text = @"Updating LinkedIn Status ..."; rdEngine = [[RDLinkedInEngine engineWithConsumerKey:LI_kOAuthConsumerKey consumerSecret:LI_kOAuthConsumerSecret delegate:self] retain]; RDLinkedInAuthorizationController* controller = [RDLinkedInAuthorizationController authorizationControllerWithEngine:rdEngine delegate:self];    if( controller) { [self presentModalViewController:controller animated:YES];     }else{ [self _shareLin]; } //LinkedIn *lin = [[LinkedIn alloc] init];} #pragma mark -#pragma mark LinKedIN #pragma mark RDLinkedInEngineDelegate - (void)linkedInEngineAccessToken:(RDLinkedInEngine *)engine setAccessToken:(OAToken *)token {   [token storeInUserDefaultsWithServiceProviderName:@"LinkedIn" prefix:@"BTAQ"]; // store user info "login email&password"} - (OAToken *)linkedInEngineAccessToken:(RDLinkedInEngine *)engine {      return  [[[OAToken alloc] initWithUserDefaultsUsingServiceProviderName:@"LinkedIn" prefix:@"BTAQ"] autorelease]; // retrive user info if stored} - (void)linkedInEngine:(RDLinkedInEngine *)engine requestSucceeded:(RDLinkedInConnectionID *)identifier withResults:(id)results { /NSLog(@"++ LinkedIn engine reports success for connection %@\n%@", identifier, results);} - (void)linkedInEngine:(RDLinkedInEngine *)engine requestFailed:(RDLinkedInConnectionID *)identifier withError:(NSError *)error {NSLog(@"++ LinkedIn engine reports failure for connection %@\n%@", identifier, [error localizedDescription]);} #pragma mark RDLinkedInAuthorizationControllerDelegate - (void)linkedInAuthorizationControllerSucceeded:(RDLinkedInAuthorizationController *)controller {NSLog(@"Authentication succeeded.");NSLog(@"Fetching current user's profile on connection %@", [controller.engine profileForCurrentUser]); [rdEngine updateStatus:@"New Status"];} - (void)linkedInAuthorizationControllerFailed:(RDLinkedInAuthorizationController *)controller { //NSLog(@"Authentication failed!"); UIAlertView *a = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Error occurred while updating Linkedin status." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [a show]; [a release]; working_lbl.hidden = TRUE;} - (void)linkedInAuthorizationControllerCanceled:(RDLinkedInAuthorizationController *)controller {NSLog(@"Authentication was cancelled.");} @end ------------------------------------I hope this help you.

Joined: 2010-08-11
Aug 29, 2010

Thank you for your support. I had step by step to do with your work follow, when i build app, i have 2 error message No Such as File or Dicrectories. I don't know i have to create a file oauth.a like the tutorial in Readme.text at OAuthConsumerLib or not. Could you please help me?Thanks and Regards,Thuong Tran.

Mohammed Ameen's picture
Joined: 2010-08-09
Aug 31, 2010

-- i have 2 error message No Such as File or Dicrectories you may write path  with error in this step7 - on build tab     a- add "$(SRCROOT)/Libs/linkedin/LinkedInClientLibrary" to "Header search paths"     b- add "$(SRCROOT)/Libs/linkedin/OAuthConsumeriPhoneLib"  to "user header search paths"if you have path like this  [my app\app1\] i mean have space in path you must write path with ' "  ' at start and end of path.i have the same error at start and this was the solution make sure that you write correct paths in this steps

Joined: 2010-08-11
Aug 31, 2010

-- i have 2 error message No Such as File or Dicrectories you may write path  with error in this step7 - on build tab     a- add "$(SRCROOT)/Libs/linkedin/LinkedInClientLibrary" to "Header search paths"     b- add "$(SRCROOT)/Libs/linkedin/OAuthConsumeriPhoneLib"  to "user header search paths" if you have path like this  [my app\app1\] i mean have space in path you must write path with ' "  ' at start and end of path. i have the same error at start and this was the solution make sure that you write correct paths in this steps---------------------------------------------------------------------------------------Thank you for your help. I had solved this prolem. In this time my application is run well  in simulator but when i build in device. it's seem to be crash when i try to get connections. I don't know why. could you please tell me why and i have to configuration more or not.While I investigate LinkedIn API i have a situation. Example i three view controller, in the first view i have a Engine object that is Authenticated, this view just is require user login to application, and next view i want to get connections i need a engine to request connection api. But when i create a new engine this is the same this engine is not authenticated. If i want to pass authentication i have to reuse the first engine from previous view controller or i have init a engine object at main view delegate. I want to ask you what is the way allow me using one Engine only then i could use it any view after i want. This is like face book API i have to use a face book session that is authenticated in the first view, then i could use request object to request API in next view.Thanks and Regards,Thuong Tran.

Mohammed Ameen's picture
Joined: 2010-08-09
Sep 4, 2010

you can put it in app delegate'MyAppDelegate.h'@interface MyAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {    UIWindow *window;    UITabBarController *tabBarController;      RDLinkedInEngine* rdEngine;} @property (nonatomic,retain) RDLinkedInEngine* rdEngine; ---------------use @interface shareviewController : UIViewController <RDLinkedInEngineDelegate,RDLinkedInAuthorizationControllerDelegate> {MyAppDelegate *appdelegate; }- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.view setBackgroundColor:[UIColor colorWithPatternImage: [UIImage imageNamed:@"bg.jpg"]]]; appdelegate = (MyAppDelegate*)[UIApplication sharedApplication].delegate;}then you can use  appdelegate. rdEngine

Joined: 2010-08-11
Sep 4, 2010

Thanks you so much.I also have big issue when i build application in simulator it's seem to be run well but in device it's was crashed. I think the reason is my application could not load all library when it's run in device becase i had config at Other Link Tag is none (not -all_load). If i config "-all_load" I could not build application with Adhoc. There are have 2 error is "Dupplicate library", So Could you please help me solve this issue.Thanks and Regards,Thuong Tran.

Joined: 2011-03-17
Mar 21, 2011

Hi,I have added code of LinkedIn-iPhone(https://github.com/ResultsDirect/LinkedIn-iPhone) & impleneted the same in my application.Whenever I am running my app on simulator, it is working fine. But when test the same app on the actual Device. It is giving me following error:2011-03-21 16:01:23.576 HomeBase[304:307] Authentication succeeded.2011-03-21 16:01:23.591 HomeBase[304:307] Fetching current user's profile on connection 19C86B60-F112-4430-99B9-6ECF55425894(gdb) continue2011-03-21 16:01:26.193 HomeBase[304:307] libxml error level 3: Entity 'nbsp' not defined2011-03-21 16:01:30.447 HomeBase[304:307] ++ LinkedIn engine reports failure for connection 19C86B60-F112-4430-99B9-6ECF55425894The operation couldn’t be completed. (RDLinkedInResponseParserDomain error 0.)Kindly give me your sugession to fix this issue.Thanks In Advance

Gary Wang's picture
Joined: 2010-09-24
Oct 17, 2010

I implemented the API and reached the modal view with the PIN, but the modal view is stuck there, you can go nowhere and cannot finish the authorisation. See http://developer.linkedin.com/thread/2297 for more details.

Nik Burns's picture
Joined: 2009-11-23
Feb 28, 2011

I also had this problem. If only we'd read the readme  ;-)Go to your developer profile on linkedIn (your stuff > api keys)under your application there is a Oauth callback URL field, add in:http://linkedin_oauth/successThis will fix your problem

Bursys Developer's picture
Joined: 2011-03-09
Mar 9, 2011

HiI have download the source from https://github.com/ResultsDirect/LinkedIn-iPhoneand try to use in my application.I have followed all the steps already whatever mention here by you...But I have getting the error

"_OBJC_CLASS_$_RDLinkedInEngine", referenced from:"_OBJC_CLASS_$_RDLinkedInAuthorizationController", referenced from:

Error image in attachmentWhen I comment the lines of RDLinkedInEngine and RDLinkedInAuthorizationController then error are removed

- (void)loadView {    [super loadView];//    rdEngine = [[RDLinkedInEngine engineWithConsumerKey:kOAuthConsumerKey consumerSecret:kOAuthConsumerSecret delegate:self] retain];}- (void)viewDidAppear:(BOOL)animated {    [super viewDidAppear:animated];    //    if( !rdHasAppeared ) {//        UIViewController* controller = [RDLinkedInAuthorizationController authorizationControllerWithEngine:rdEngine delegate:self];//        if( controller ) {//            [self presentModalViewController:controller animated:YES];//            rdHasAppeared = YES;//        }//        else {//            NSLog(@"Already authenticated");//        }//    }}

I my application I have already integrated MGTwitterEngine from source https://github.com/bengottlieb/Twitter-OAuth-iPhoneWhich is wokring ok.ThanksAmit Battan

Bursys Developer's picture
Joined: 2011-03-09
Mar 9, 2011

I missed the point .

4- select   "LinkedInClientLibrary.xcodeproj" that you dropped in the right side marke checkbox " LinkedInClientLibrary.a"

now that 2 error goes ok.. but new error comes

'Command  /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2  failed with exit code 1'

EDITand if again I follow all the steps then I face 73 errorserror images are in attachment

Joined: 2011-07-29
Aug 23, 2011

i am trying to integrate linkedIn with my application. I used this sdk linkedIn sdk at github .I am able to successful login to linkedIn and allow linked In to connect with my application, But i want to know that, do RDLinkedInEngine or some other class in this api provide view to share text on wall like Facebook api have? Other resources or link is strongly recommended

Kirsten Hunter's picture
Joined: 2011-06-30
- (Reply to #15) Aug 24, 2011

The

Joined: 2011-09-30
Sep 30, 2011

Hi..i followed steps abpve...but when i tried to run on simulator,

it gave compilation error........

ResultsDirect-LinkedIn-iPhone-00328a2/LinkedInClientLibrary/build/Debug-iphoneos/libLinkedInClientLibrary.a depends on itself. This target might include its own product.

Please help me out..

Thanks in advance

Kirsten Hunter's picture
Joined: 2011-06-30
Sep 30, 2011

There's another example client here:
https://github.com/synedra/LinkedIn-OAuth-Sample-Client

Muhammad saqib's picture
Joined: 2012-02-14
Mar 9, 2012

I have setup my applications on linkedIn for my iPhone APP. I want to get all the users of my Applications. which allows my LinkedIn Application within there iPhone Application. Can anyone guide how can i get all my LinkedIn Application users within my iphone Application

Joined: 2012-07-02
Jul 15, 2012

mailbox API not working for me description as below please help me.

<error>
<status>401</status>
<timestamp>1342354072884</timestamp>
<request-id>AURIF2W810</request-id>
<error-code>0</error-code>
<message>[unauthorized]. OAU:npiovkburzb0|1a9969a4-9ecf-4587-9ed5-805a82ad0c30|*01|*01:1342354072:zcxaHdMNRAZ8pS5jUsfkYGpnWfw=</message>
</error>

please note that share API working fine with same Auth.

Thanks,
Nilesh

Harpreet Singh's picture
Joined: 2012-02-29
Aug 10, 2012

Hi,

I have integrated the Linkedin in iPhone application with https://github.com/synedra/LinkedIn-OAuth-Sample-Client example, I changed some of the code part. then I got able to successfully run the application.

Now, I successfully logged in and my name is displaying there. It ask update your status. but when I write some content to post on my wall. nothing happens. click on the Post Update button many times, but unable to post.

Thanks,
Harpreet

Joined: 2012-08-21
Aug 22, 2012

Same problem for me no update on my wall

Alessandro

Ajeet Patel's picture
Joined: 2012-08-20
Aug 22, 2012

The share Function is not working it's giving http error 403.

Ajeet

Joined: 2012-09-11
Sep 11, 2012

Hi Mohammed Ameen,

I drag and droped file "LinkedInClientLibrary.xcodeproj" in "LinkedInClientLibrary" folder to you project "files tree on left side" to group frameworks [ DEFAULT FRAMEWORKS FOLDER].

and I dont understand the text you said here like [ select "LinkedInClientLibrary.xcodeproj" that you dropped in the right side marke checkbox " LinkedInClientLibrary.a" ]. It would be great if you assist me for this issue. this is my mail id "sathish_jdev@in.com""kmr.vetri@gmail.com"

Muhammad Umar's picture
Joined: 2012-07-22
Oct 7, 2012

Hey guys, I have set up things correctly. It takes me to linkedIn login page and after login to give permissions I get this error

Failed to load page Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0x81e2250 {NSErrorFailingURLStringKey=http://www.devbee.ca/?oauth_token=MY_TOKEN&oauth_verifier=VERIFIER, NSErrorFailingURLKey=MY_REDIRECT_URL/?oauth_token=MY_OAUTH_TOKEN&oauth_verifier=MY_VERIFIER, NSLocalizedDescription=A server with the specified hostname could not be found., NSUnderlyingError=0x810ddc0 "A server with the specified hostname could not be found."}

What is wrong?

Kamyar Mohager's picture
LinkedIn Employee
Joined: 2012-04-04
Oct 8, 2012

Can you show your full request including headers? Thanks.

Pratipalsinh Jadeja's picture
Joined: 2013-03-28
Mar 29, 2013

hi Sathish kumar, i m also facing same problem as you had.
i m trying to run ResultsDirect/LinkedIn-iPhone projects but two files libOAuthConsumer_iPhone.a &
libLinkedInClientLibrary.a are missing from project zip file downloaded from git hub & i don't know where to find these files, i have searched over the net but got no solution please help me if you have found the solution my email id is : prjadeja@yahoo.co.in

thanks in advance

Test Account's picture
Joined: 2013-07-14
Jul 15, 2013

Same problem here...Please Help..!

Fadia Jaradat's picture
Joined: 2013-06-19
Jul 24, 2013

Hi,
How I can fetch linked in profile photo in objective c
Thanks