Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8
Release ShareSocial - Social media sharing & More
#1
Image

Social media sharing with XBMC

Allows addons to share to sites via other addons. Addons can register as share targets, and other addons can share to those targets.
Has an option to add a context menu modification to share media from XBMC.

Image

Includes a feed viewer and allows addons to register as a feed source.

Image

Allows you to update your status to one or more sites.
Has twitter sharing/feeds built in.

Currently works with the Facebook Media, flickr, X-Note (Evernote) addons and the builtin Twitter.

So if you have those installed you can:
View feeds from and update your status to facebook, flickr and twitter.
Share media from flickr and facebook.
Share media to Facebook, Twitter and Evernote.
With the context menu mod share any media from XBMC that is either a file or a normal web URL

More options to come as I continue to add functionality to these and my other addons.

On my REPO
If you need help, ask a question in this thread or join #ruuk on freenode.


Install the latest versions of the addons from the below threads (also on my REPO) to make it useful:

Facebook Media

flickr

X-Note (Evernote)
Reply
#2
This is awesome. Maybe it's my skin , but ShareSocial renders my timeline in all caps.
Reply
#3
(2012-03-18, 01:55)hams1000 Wrote: This is awesome. Maybe it's my skin , but ShareSocial renders my timeline in all caps.
Yeah, that would be the skin. What skin btw?
While I don't have the time to make custom addon skins for every XBMC skin out there, I might be able to add some code that tries to modify the addon's font to match the fonts of the current skin. As it is, if the font name the addon uses is not a font name the skin uses (and this is often the case) then the skin's default font is used.
Reply
#4
(2012-03-18, 02:48)ruuk Wrote:
(2012-03-18, 01:55)hams1000 Wrote: This is awesome. Maybe it's my skin , but ShareSocial renders my timeline in all caps.
Yeah, that would be the skin. What skin btw?
While I don't have the time to make custom addon skins for every XBMC skin out there, I might be able to add some code that tries to modify the addon's font to match the fonts of the current skin. As it is, if the font name the addon uses is not a font name the skin uses (and this is often the case) then the skin's default font is used.

Aeon MQ3. No worries I'll mess around with it. I'm happy to be able to an eye on my twitter stream from XBMC.
Reply
#5
I can't believe no one has commented on this yet. I for one want to see more info gathering addons like this. Sadly I'm not much help because I only use the twitter part of if. For displaying my timeline it's fantastic. Wouldn't mind being able to fire off a non media related tweet, I never really post what I'm watching. I do wonder if you can get embed.ly to work for embedded images.

Reply
#6
(2012-03-18, 20:43)hams1000 Wrote: I can't believe no one has commented on this yet. I for one want to see more info gathering addons like this. Sadly I'm not much help because I only use the twitter part of if. For displaying my timeline it's fantastic. Wouldn't mind being able to fire off a non media related tweet, I never really post what I'm watching. I do wonder if you can get embed.ly to work for embedded images.

If I understand what your asking for, you just need to bring up the context menu and select 'Update Status' and type in your Tweet. You will get to choose the target for the message (in your case, Twitter) and there you go.

I'll look into the embed.ly thing.

Also new version: (Couldn't seem to make a new post for this, it kept adding it to this post)

This version adds the ability to view youtube videos from tweets, and also adds the ability to share photos and videos from tweets.

Download Version 0.1.2
Reply
#7
is this on a repo anywhere so that it can autoupdate?
Nvidia Shield with Kodi 18
Reply
#8
(2012-03-19, 17:03)rflores2323 Wrote: is this on a repo anywhere so that it can autoupdate?

It plan to post it to the main repo as soon as I get more feedback that it's working well for everybody. I only released it a couple of days ago Smile
Reply
#9
Looking pretty awesome. I'm having a little trouble deciphering the intent behind some of the functions though. Let's say I have one of my list items that points to http://www.example.com/video.avi.

What would I need to feed to RunScript() in order to let a user share that link on Twitter?
Reply
#10
(2012-03-20, 05:49)Bstrdsmkr Wrote: Looking pretty awesome. I'm having a little trouble deciphering the intent behind some of the functions though. Let's say I have one of my list items that points to http://www.example.com/video.avi.

What would I need to feed to RunScript() in order to let a user share that link on Twitter?
Code:
import ShareSocial

share = ShareSocial.getShare('add.on.id','video')

share.media = 'http://site.com/vid.avi'
share.thumbnail = 'http://site.com/vid_thumb.jpg'
share.title = 'appropriate title'
share.page = 'link to page media is hosted on'

share.share()

And that's basically it. Look at the code for the share object to see what other fields there are. You should fill as many as you can so that the target has options on how to display the share.

I just realized you're probably talking about a plugin scenario. In that case you have a couple of options.

You can do as above ( minus the share.share() ) and then call:
Code:
data = share.toString()

call Runscript back to your addon with the string and from there call:

Code:
share = ShareSocial.Share().fromString(data)
share.share()

Alternatively, you can can handle passing whatever data you need back to your script and then build the share at that time. The advantage of that method is that you don't need to import ShareSocial until the user is doing the sharing, outside the plugin operation, which avoids any extra delay the import causes.

All this has given me the idea that perhaps it would be nice to add share.getPluginRunScript() which would return a string you could just drop into the listitem, and which would call ShareSocial which would handle it from there.

I still need to create some documentation of course, but hopefully this is helpful Smile

My goal with this is to make it as simple as possible for an addon author to add sharing - with ShareSocial doing all the work.

Let me know if you have any more questions.

Reply
#11
Yeah that clears things up well.

I'm using the t0mm0.common lib which has a build_plugin_url() method that returns a url that can be fed to RunPlugin, and that has me spoiled lol

I'll have to monkey with it and see if I can get it working in my next release. The site I'm scraping also has a comments stream. Am I correct in thinking that I could create it as a feedsource and show/post to those comments through ShareSocial? The comments are media specific, not site wide, so would that still work?
Reply
#12
(2012-03-20, 20:51)Bstrdsmkr Wrote: Yeah that clears things up well.

I'm using the t0mm0.common lib which has a build_plugin_url() method that returns a url that can be fed to RunPlugin, and that has me spoiled lol

I'll have to monkey with it and see if I can get it working in my next release. The site I'm scraping also has a comments stream. Am I correct in thinking that I could create it as a feedsource and show/post to those comments through ShareSocial? The comments are media specific, not site wide, so would that still work?

(I'm on my phone so this will be short)

If I'm understanding you correctly, then yes. Right now you can view the feed items and their comments. Posting a comment isn't there yet but it will be and should be easy to add. I'm visiting friends for the next three days, but I'll try and post the details of setting up a feed source if I can get a moment.
Reply
#13
First you need to register your addon. In my addons I do it when the addon starts which ensures any changes I make get updated, but do it however it makes since for your situation.
If you're just providing a feed you don't need to define target.shareTypes - that is for share targets.

Code:
import ShareSocial

target = ShareSocial.getShareTarget()
target.addonID = 'add.on.id'
target.name = 'Display Name'
target.importPath = 'relative_path_within_addon_dir_for_import'
target.iconPath = "path_to_icon" #optional image, addon's icon will be used if not supplied.
target.shareTypes = ['status','imagefile','image','video']
target.provideTypes = ['feed']
ShareSocial.registerShareTarget(target)

And then within the target.importPath from above you need to create a function called doShareSocial() that returns instance of subclass of ShareSocial.TargetFunctions.
So for instance you could create a file in your addon directory callled sharingstuff.py and you would set target.importPath = 'sharingstuff' and define the following function/class in that file.

Code:
def doShareSocial():
        return MyTargetFunctions()

class MyTargetFunctions(ShareSocial.TargetFunctions):
        def getFeedComments(self,commsObj,callback_data):
               #see the provide function on details on what to do with the commsObj
               #the callback_data is what you passed in the provide function and would use to retrieve additional comments
               return commsObj

        def provide(self,feedList,ID=None):
               commsObj = feedList.getCommentsList()
               commsObj.count = total_number_of_comments_including_non_yet_visible_comments
               commsObj.callbackDict = {dict of data to pass back to getFeedComments()}
               commsObj.addItem('commenter name','url to commenter image','comment text','timestamp of post in unixtime or iso8601')

               user = {'id':'id_for_user','name':'users_display_name','photo':'url_to_user_image'} #This is optional. Example usage would be the facebook addon allows multiple users and this data lets the feed viewer show on to which users account the item was posted
               feedList.addItem('name of item poster','url to poster image','text of the post','timestamp of post in unixtime or iso8601','url to image for the post',comments=commsObj,client_user=user,share=share)
               #you would call the above for each item you wanted to add to the feed
               #comments are optional
               #share is optional and is used if you have something shareable in the item and is a Share object as described in a previous post

               #then return the feedList
               return feedList

        def getUsers(self,share=None):
                """
                        Must return a list of dicts in the form of
                        {'id':user_id,'name':user_display_name,'photo':user_photo_url}
                        
                        id is REQUIRED and will be (possibly) passed to other functions
                        name is REQUIRED and will be used when showing relevant data to the user
                        photo is OPTIONAL
                        
                """

The getUsers() funtion only needs to be defined if your addon can have multiple users

I just whipped this up fairly quick. Hopefully this makes sense Smile

Please let me know if I've been confusing on any point or you have any questions

Reply
#14
I have enabled the facebook media addon and it is working to get videos and pictures, etc.. I try ShareSocial and just get two blank screens. I am on a windows pc with eden rc2. sharesocial is 0.1.2 version
Nvidia Shield with Kodi 18
Reply
#15
(2012-03-25, 07:36)rflores2323 Wrote: I have enabled the facebook media addon and it is working to get videos and pictures, etc.. I try ShareSocial and just get two blank screens. I am on a windows pc with eden rc2. sharesocial is 0.1.2 version

Did you try ShareSocial after you started Facebook Media? Facebook media needs to be run at least once (and a user configured) before it's feed will show up in ShareSocial. That is so it can register as a feed source. If you tried that, then a log would be helpful Smile

Edit: Just added a new version (next post), see if it helps.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
ShareSocial - Social media sharing & More1