Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 9
Registered: ‎07-21-2012
My Device: 9900
My Carrier: TMobile

Integrate Cascades with getSocialize

Hi,

 

I am stumped implementing OAuth for getSocialize (getSocialize Docs).

 

I am using the OAuth library and have been able to hookup facebook authentication/authorization. For getSocialize the docs state:

 

End Point: https://apigetsocialize.com/v1/authenticate

Method: POST

All PUT/POST methods require a payload parameter that is a json dictionary containing the appropriate parameters for that method.

 

My code is below (snippet):

String payload;
QTextStream(&payload) << "{\"udid\":\"" << APPID << "\" \"auth_token\":" << "\"TOKEN\"" << " \"auth_secret\":" << "\"TOKEN_SECRET\"" << " \"auth_type\":" << "\"2\"}";
qDebug() << "Payload: " << payload;
oauthRequest->initRequest(KQOAuthRequest::TemporaryCredentials, QUrl("https://api.getsocialize.com/v1/authenticate/"));
 
KQOAuthParameters params;
params.insert("payload",payload);
oauthRequest->setAdditionalParameters(params);
oauthRequest->setHttpMethod(KQOAuthRequest::POST);
oauthRequest->setConsumerKey(CONSUMER_KEY);
oauthRequest->setConsumerSecretKey(CONSUMER_SECRET);
oauthRequest->setEnableDebugOutput(true);
oauthManager->setHandleUserAuthorization(true);
oauthManager->executeRequest(oauthRequest);

 

 

This fails to return the expect oauth tokens. Any help will be appreciated.