0

My site has a content type named News, which receives news from external RSS feed. Therefore, content type News has the following fields:

I would like to create 3 fields in the content type that shows count of article has been shared on LinkedIn in using the following function:

http://www.linkedin.com/countserv/count/share?url=http://www.reuters.com/article/2015/04/20/hapaglloyd-ships-idUSL5N0XH3XQ20150420&format=json

Return

{"count":28,"fCnt":"28","fCntPlusOne":"29","url":"http:\/\/www.reuters.com\/article\/2015\/04\/20\/hapaglloyd-ships-idUSL5N0XH3XQ20150420"}

Fields to be displayed:

  • count (i.e. 28)
  • fCnt (i.e. 28)
  • fCntPlusOne (i.e 29)
0

I managed to create a custom module for this with specific fields for twitter an linkedin. The module will call the JSON function every time the node is saved.

Additionally, a cron has been set up to be run every 5 minutes and re-save the nodes which make the node to be updated with the right count.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.