iphone - 在 iPhone 的 LinkedIn 集成中共享图像

标签 iphone ios objective-c xcode

我们可以通过LinkedIn 集成iPhone 应用程序中分享消息(文本)。....

但是有没有可能通过 LinkedIn 集成iPhone 应用程序 中分享本 map 片url 图片 ……?

提前致谢.....

最佳答案

我是如何得到相对解决方案的……

在 iPhone 中的 LinkedIn 集成中共享图像---->

NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~/shares"];
OAMutableURLRequest *request = 
[[OAMutableURLRequest alloc] initWithURL:url
                                consumer:oAuthLoginView.consumer
                                   token:oAuthLoginView.accessToken
                                callback:nil
                       signatureProvider:nil];

NSDictionary *update = [[NSDictionary alloc] initWithObjectsAndKeys:
                        [[NSDictionary alloc] 
                         initWithObjectsAndKeys:
                         @"anyone",@"code",nil], @"visibility", 
                        statusTextView.text, @"comment",[[NSDictionary alloc]
                                                         initWithObjectsAndKeys:
                                                         @"description goes here",@"description",
                                                         @"www.google.com",@"submittedUrl",
                                                         @"title goes here",@"title",
                                                         @"http://economy.blog.ocregister.com/files/2009/01/linkedin-logo.jpg",@"submittedImageUrl",nil],@"content", nil];

[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSString *updateString = [update JSONString];

[request setHTTPBodyWithString:updateString];
[request setHTTPMethod:@"POST"];

OADataFetcher *fetcher = [[OADataFetcher alloc] init];
[fetcher fetchDataWithRequest:request
                     delegate:self
            didFinishSelector:@selector(postUpdateApiCallResult:didFinish:)
              didFailSelector:@selector(postUpdateApiCallResult:didFail:)];

关于iphone - 在 iPhone 的 LinkedIn 集成中共享图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14891716/

相关文章:

iphone - 重新排列数组中的值

iOS 8 iPad : Could not load NIB in bundle

ios - GPUImage 在真实设备上得到不同的结果

ios - iOS 是否包含数据库?

iOS No visible @interface for 'ViewController' 声明选择器 addGestureRecognizer 错误

ios - 了解 iOS 中的 iBeacons : didDetermineState and didEnterRegion events

iphone - 如何一起使用 xib 和 UIView 子类?

iphone - 在 UINavigationController 中推送同一类 View Controller 的不同对象

iphone - iPhone 上的基本身份验证注销

iphone - 应用程序需要添加 rootViewController