Getting user id of facebook and twitter in sharekit

前端 未结 5 1238
[愿得一人]
[愿得一人] 2020-12-10 17:18

Iam implementing facebook and twitter using sharekit for an iphone app. How can we get the user id of the logged in user so that I could send it to the server. Any help will

5条回答
  •  眼角桃花
    2020-12-10 17:45

    you can get the ID's by extending the enum in sharetype . add type as ID . and when you can share function introduce the case for ID checking .

    - (void)getFollowers
    {
        OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=%@", SHKTwitterUsername]]
                                                                       consumer:consumer
                                                                          token:accessToken
                                                                          realm:nil   // our service provider doesn't specify a realm
                                                              signatureProvider:nil]; // use the default method, HMAC-SHA1
    
        [oRequest setHTTPMethod:@"GET"];
    
        //NSString *message=[NSString stringWithFormat:@"status=oh man! OAuth u almost killed me! more info at http://dev.twitter.com"];
        //[request setHTTPBody:[message dataUsingEncoding: NSUTF8StringEncoding]];
    
        OADataFetcher *fetcher = [[OADataFetcher alloc] init];
        //todo : handle for error callback
        [fetcher fetchDataWithRequest:oRequest
                             delegate:self
                    didFinishSelector:@selector(getListsTokenTicket:didFinishWithData:)
                      didFailSelector:nil];
    
    }
    

提交回复
热议问题