jeyben / IOSLinkedInAPI

Simple and non intrusive library to get access tokens for LinkedIn using Oauth2.
MIT License
222 stars 147 forks source link

LIALinkedInClientExampleCredentials.h file not found #43

Closed nipaashra closed 9 years ago

nipaashra commented 9 years ago

I have downloaded code of IOSLinkedIn API but LIALinkedInClientExampleCredentials.h not available so, give me LIALinkedInClientExampleCredentials.h file.

jeyben commented 9 years ago

It´s probably not that clear in the documentation but the LIALinkedInClientExampleCredentials.h file is a file you should create by your self. Otherwise the given linkedin app will be shared between all people that downloads the example app.

The .h file should contain to defines: LINKEDIN_CLIENT_ID LINKEDIN_CLIENT_SECRET

The values of these too defines can be retrieved by creating an app at LinkedIn.

nipaashra commented 9 years ago

yes, same i already added LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET in my class but when run time not loaded linkedin page and its show like

" invalid redirect_uri. this value must match a url registered with the api key"

so, give me any suggestion....

jeyben commented 9 years ago

Sounds like an issue with the linkedin application you have created:

You can probably get some hints her: https://developer.linkedin.com/forum/invalid-redirecturi-value-must-match-url-registered-api-key-0

here: http://stackoverflow.com/questions/26570194/linkedin-invalid-redirect-uri-this-value-must-match-a-url-registered-with-the

or here: https://naveengopisetty.wordpress.com/2014/09/15/linkedin-oauth-2-0-issue-invalid-redirect_uri-this-value-must-match-a-url-registered-with-the-api-key/

nipaashra commented 9 years ago

Thank you solved this issue...

nipaashra commented 9 years ago

IOSLinkedInAPI its work fine but I have integrated in my code that it returns error like

"AFnetworking/AFnetworking.h file not found"

I have already install pod file in IOSLinkedInAPI and that pod file integrated to my project but its return error.

so, give me any suggestion for that....

jeyben commented 9 years ago

The IOSLinkedInAPI uses AFNetworking 2.x. Have you made a pod install and can you see that AFNetworking is linked as a pod along the IOSLinkedInAPI?

nipaashra commented 9 years ago

yes I have installed pod and i see that AFNetworking is linked as a pod along the IOSLinkedInAPI.

but i want to integrate in my project for linkedIn login purpose and I have put IOSLinkedInAPI pod file to my project and its give error "AFnetworking/AFnetworking.h file not found".

jeyben commented 9 years ago

You should not put the podfile from the IOSLinkedInAPI into you own project, but add a reference to the IOSLinkedInApi in you existing podfile. Like it is done in the example application.

nipaashra commented 9 years ago

example application there is not show xcode file how can I run this "IOSLinkedInAPI-Example" ?

jeyben commented 9 years ago

You should run the pod example: https://github.com/jeyben/IOSLinkedInAPI/tree/master/Example/IOSLinkedInAPI-Podexample/IOSLinkedInAPI-Podexample

Run pod install and afterwards open the workspace file which is generated for you

nipaashra commented 9 years ago

Yes, I done all this things and workspace run fine i got result for linkedIn logged users.

but my question is that when I integrated pod file in own project at time give error......

jeyben commented 9 years ago

then it should be possible to see the differences in how the example app is setup and how you own project is setup.

I mean do you have an entry in you own podfile saying: pod 'IOSLinkedInAPI'

Afterwards you should run pod install... That should be all for you to fetch latest released version and associated libraries (AFNetworking 2.x)

No copy of the source files etc. Just pod install

nipaashra commented 9 years ago

You mean all process of pod file (install, workspace) should do in own project like i have done for IOSLInkedInAPI ..?

nipaashra commented 9 years ago

Thank You its work fine my project.

nipaashra commented 9 years ago

how to get email address ...? I have already given permission of email_address. I got result of

firstName = headline = lastName = siteStandardProfileRequest = { url = ""; };

but email address not show...so, please give any suggestion for that

nipaashra commented 9 years ago

its done I have used this code

[self.client GET:[NSString stringWithFormat:@"https://api.linkedin.com/v1/people/~:(id,first-name,last-name,maiden-name,email-address)?oauth2_access_token=%@&format=json", accessToken] parameters:nil success:^(AFHTTPRequestOperation operation, NSDictionary result) { NSLog(@"current user %@", result);

}        failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"failed to fetch current user %@", error);
}];