Use the Follow API to link your audience to your various social media profiles to grow your social influence on Facebook, Twitter, Pinterest, YouTube, Instagram, etc. If you're unable to use the Shareaholic JavaScript SDK, you can link to these API endpoints directly.
https://www.shareaholic.com/v2/follow/
?service_nickname= (required; example: twitter)
&api_key= (required; example: 8943b7fd64cd8b1770ff5affa9a9437b)
&username= (optional; example: beyonce)
&app_id= (optional; example: 1234)
&app_id_name= (optional; example: contact_page_placement)
One of either username
, app_id
or app_id_name
is required
For example:
https://www.shareaholic.com/v2/follow/?service_nickname=twitter&username=beyonce&api_key=8943b7fd64cd8b1770ff5affa9a9437b
All API endpoints require authentication credentials to be supplied as query arguments (api_key=...
). To get started, you'll need a free Shareaholic user account and Site Profile ID. Signup for an account and then add a site to get your Site Profile ID. The Site Profile ID is your API Key.
If you prefer, for any reason, not to use your service username
in URL, you can use app_id
or app_id_name
as query argument.
You can find app_id
value by clicking "code" link in Follow Buttons overview on your site's application tab on Shareaholic website. Value is shown as data-app-id
attribute in displayed HTML.
app_id_name
value is name of your Follow Buttons app in Shareaholic interface, with spaces replaced by underscore, for instance: follow_buttons_after_post
. Keep in mind that if you change your Follow Buttons application name, this will change too!
Required query argument are api_key
, service_nickname
and one of the following: username
, app_id
or app_id_name
.
It's possible to make follow request that will return JSON, just add .js
extension to URL path. For example:
https://www.shareaholic.com/v2/follow.js?service_nickname=twitter&username=beyonce&api_key=8943b7fd64cd8b1770ff5affa9a9437b
Response:
{
"status_code": "200",
"data": {
"message": "follow created",
"link": "https://twitter.com/intent/follow?screen_name=beyonce"
}
}
On request with missing or invalid query arguments error is returned:
https://www.shareaholic.com/v2/follow?service_nickname=twitter
{
"errors": [
{
"code": "100",
"source": {
"pointer": "/data/attributes/api-key"
},
"detail": "Invalid API Key. Register an API key for free or lookup your existing API key at https://www.shareaholic.com/sites."
},
{
"code": "120",
"source": {
"pointer": "/data/attributes/username"
},
"detail": "Invalid username, app_id or app_id_name. Check out the docs at https://github.com/shareaholic/shareaholic-api-docs/blob/master/api_follow_api.md for usage examples."
}
]
}
- 100 -
api_key
was not provided - 101 -
api_key
provided is invalid - 110 -
service_nickname
is not provided - 111 -
service_nickname
provided is invalid - 120 -
username
orapp_id
orapp_id_name
is missing in request or invalid value provided
- about_me
- bbb
- behance
- bloglovin
- disqus
- dribbble
- ebay
- etsy
- feedly
- five_hundred_px
- flickr
- foursquare
- github
- google_classroom
- google_plus
- houzz
- itunes_podcast
- linkedin_company
- livejournal
- mix
- odnoklassniki
- polyvore
- rss
- skype
- slideshare
- soundcloud
- spotify
- stackoverflow
- tripadvisor
- tumblr
- twitch
- vimeo
- vine
- vk
- yelp
- youtube
- zillow_digs