1

iPad アプリケーションで、LinkedIn に URL を投稿したいと考えています。

現在、次の API を使用しています。

ドキュメントを参照してhttp://api.linkedin.com/v1/people/~/shares

  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",
                        @"www.google.com", @"comment", 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:)];

上記のコードは機能し、LinkedIn に www.google.com を投稿できます。

ただし、この URL を http://itunes.apple.com/us/app/now-next/id724323924?ls=1&mt=8に置き換えると、

APIから成功のレスポンスコードを返します。しかし、この URL を含む投稿が LinkedIn に表示されません。

どんな助けでも大歓迎です。皆さん、手を合わせてください..

4

0 に答える 0