Is it easy and/or is there documentation on how to add additional social networks? I have a client who has a couple other networks (i.e. Pinterest and About.me) that they would like to use as well.

Comments

TomDude48’s picture

There are two options; adding new platforms using the APIs or adding ad hoc widget definitions. The first you will need to write a module to do. The second can be done by via the admin UI by going to admin > structure > widgets > definitions.

I don't have the API system documented write now. Although the way the module is written is it uses its own API's so it is not too difficult to figure it out by looking at the code. The API hooks to look at are in:

  • socialmedia.platforms.inc - for adding the platform accounts and processing tokens
  • socialmedia.widgets.inc. - for adding widget definitions
  • socialmedia.icons.inc - if an icon is used by any widgets

I will try to get a blog post out about this shortly.

Seven_Six_Two’s picture

I'll be taking a look at those files that you suggested, but if you do happen to add some other networks before I get around to it, I would like to see a link to slashdot-profile-url or maybe badge with some basic stats (not sure what's possible ATM).
Thanks for this module BTW! It's working out well for me.

rattusrattus’s picture

Issue summary: View changes

I've tried implementing hook_socialmedia_platform_info in my own module but this seems to have no effect. Looking through your module I don't seem to be able to find any calls to module_invoke_all which would enable this hook to be implemented by other modules - am I missing something?

trumanru’s picture

Version: 7.x-1.0-beta8 » 7.x-1.x-dev

Any news?