- Basic Information Terminology, getting started and setting up your account. Recommended for new customers.
- Make your website social Step-by-step tutorials and information on how to integrate our plugins and services to your site.
- REST API Reference JSON/REST API for advanced social network integration. Must-read for developers.
User API \ Publish content a user's social network account
Send a POST request to this resource to publish content (posts, tweets ...) on the social network account of an existing user.
More advanced sharing features are available through our Social Sharing API.
| Resource/URI | GET | POST | PUT | DELETE |
Users
/users.<format>
|
List all users | – | – | – |
User
/users/<user_token>.<format>
|
Retrieve a user's details | – | – | Delete a user |
User
/users/<user_token>/contacts.<format>
|
Read a user's contacts | – | – | – |
User
/users/<user_token>/publish.<format>
|
– | Publish on social networks | – | – |
Workflow
1. Request: the code to send to the API
Send a POST request including the message structure to the resource /users/<user_token>/publish.<format>
to publish a message to a social network account. The <user_token> has to be replaced by the unique
user_token of an existing user.
This resource is only available for providers that have been fully configured and for users that have given consent to publish activity on their behalf. We currently support activity posting for Facebook, LinkedIn & Twitter.
POST data to include in your request:
{
"request":{
"message":{
"parts": {
"text":{
"body": "Message Text"
},
"video":{
"url": "http://www.example.com/sample_video.swf"
},
"picture":{
"url": "http://www.example.com/sample_picture.png"
},
"link":{
"url": "http://www.example.com",
"name": "The Example.com Website",
"caption": "Visit us for more",
"description": "This domain is used as example."
}
},
"providers":[
"facebook"
]
}
}
}
The message representation ultimately depends on the provider. For Twitter for example the message will be published as a new Tweet, and for Facebook as a post on the wall of the user. You can publish a message on multiple social networks simultaneously, the API takes care of dispatching the message accordingly.
Facebook Example: Structure
{
"request":{
"message":{
"parts":{
"picture":{
"url": "http://cdn.oneall.com/img/heading/slides/provider_grid.png"
},
"link":{
"url": "http://www.oneall.com",
"name": "oneall.com",
"caption": "Social API",
"description": "oneall simplifies the integration of social networks for Web 2.0 and SaaS companies"
}
},
"providers":[
"facebook"
]
}
}
}
Facebook Example: Message Representation