OneAll Module Issue
Jamroom Developers
We have downloaded the OneAll SDK and try the following code but getting same error:
//Publish message for this user_token
$user_token = '---------';
//Publish message to this networks
$providers = array (
'facebook'
);
//Message Structure
$message_structure = array (
'request' => array (
'sharing_message' => array (
'parts' => array (
'text' => array (
'body' => '
http://www.oneall.com oneall simplifies the integration of social networks for Web 2.0 and SaaS companies http://www.oneall.com'
),
'picture' => array (
'url' => 'http://oneallcdn.com/img/heading/slides/provider_grid.png'
),
'link' => array (
'url' => 'http://www.oneall.com/',
'name' => 'oneall.com',
'caption' => 'Social Media Integration',
'description' => 'Easily integrate social services like Facebook, Twitter, LinkedIn and Foursquare with your already-existing website.'
),
'flags' => array (
'enable_tracking' => 1
)
),
'publish_for_user' => array (
'user_token' => $user_token,
'providers' => $providers
)
)
)
);
//Encode structure
$message_structure_json = json_encode ($message_structure);
//Make Request
if ($oneall_curly-> post (SITE_DOMAIN . "/sharing/messages.json", $message_structure_json))
{
$result = $oneall_curly-> get_result ();
print_r (json_decode ($result-> body));
}
//Error
else
{
$result = $oneall_curly-> get_result ();
echo "Error: " . $result-> http_info . "\n";
}