ios - 如何为 LinkedIn 生成访问 token ?

标签 ios objective-c linkedin-api

我只是想通过我的 iOS 应用程序“与 linkedIn 分享”。

How to generate access toke before sharing on linked In, how to generate it ?

这是我在链接中发帖的代码。但它不起作用,因为我没有访问 token 。

// For positing on linked In

    [[LISDKAPIHelper sharedInstance] apiRequest:@"https://api.linkedin.com/v1/people/~/shares?format=json" method:@"POST" body:[bodyTxtView.text dataUsingEncoding:NSUTF8StringEncoding]
                success:^(LISDKAPIResponse *response)
                 {
                     NSLog(@"success called %@", response.data);
                }
              error:^(LISDKAPIError *apiError) {
                   NSLog(@"error called %@", apiError.description);

                    dispatch_sync(dispatch_get_main_queue(), ^{
                        LISDKAPIResponse *response = [apiError errorResponse];
                                                  NSString *errorText;
                              if (response)
                              {
                                    errorText = response.data;
                               }
                               else
                               {
                                   errorText = apiError.description;
                                }
                        NSLog(@"error called %@", errorText);
                 });
          }];

最佳答案

示例代码在从 https://developer.linkedin.com/downloads 下载的 SDK(在示例应用程序内)中给出

关于ios - 如何为 LinkedIn 生成访问 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34313758/

相关文章:

ios - 关闭模态视图时不调用 ViewDidAppear

ios - 如何在 BBC News 应用程序的 UIScrollView 中添加 "advertisements"?

api - 即使用户已通过身份验证,LinkedIn 授予访问权限屏幕也会显示

ios - View 已绘制但未检测到手势识别器

ios - 从网络获取链接 MP3

ios - 我如何检测我的应用程序是从哪个设备注册的?

objective-c - 从其他已经初始化的类中调用NSView

oauth - 在 linkedin 应用程序中哪里可以找到 Oauth token 和 secret

java - 领英 API。如何获得一个弹出窗口,要求用户单击“允许”并自动获取代码,而不是在 Linkedin 中复制和粘贴

ios - 在弧形中添加 UIButton