Coder Social home page Coder Social logo

reclaim-social-media's People

Contributors

csenf avatar danito avatar diplix avatar moschlar avatar muesli avatar nonsenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reclaim-social-media's Issues

Allow configuration of n Twitter feeds

as of now only one twitter feed can be configured. (same goes for all other classes.) it would be nice if more than one feed could be configured and saved to different categories and wordpress users.

simple_html_dom : execution time out

The YT favorites import doesn't work and I was looking into the error logs and I came across a lot of
Maximum execution time exceeded in ...../reclaim/vendor/simple-html-dom/simple-html-dom/simple-html-dom.php on line xxxx
(several lines, e.g. 1406, 1497, 439).
can I ignore this? Does this affect the YT import?

Plugin does noch honor "Update Interval" setting

the plugins seems to trigger an update to active services every time the page loads.
also not sure what "Auto-update" does exactly.

to reproduce: try to delete 1 or 2 recent tweets. they will reappear instantaneously.

dealing with PHP time and memory limits in safe mode

if safe mode is not activated, both, the PHP time and memory limits, can be increased to a limit where an initial import of >300 tweets or facebook posts run through. many shared hosters don't allow increasing those limits, so we might have to find a way to queue the imports in little chunks. if there is a queueing mechanism, a progress indicator would also be nice.

twitter import fails

My twitter import doesn't work anymore since a couple of days (I have latest updates of twitter.class.php).

reclaim-log shows that twitter BEGIN but no END:

Last working import:
[2014-01-23T16:33:33+00:00]: reclaim_twitter_locked is 0
[2014-01-23T16:33:33+00:00]: BEGIN twitter import
[2014-01-23T16:33:34+00:00]: Retrieved set of twitter messages: 0, last seen id: 426376175624019968, last id in batch: , req-ok: 0
[2014-01-23T16:33:34+00:00]: END twitter import
[2014-01-23T16:33:34+00:00]: reclaim_vine_locked is
[2014-01-23T16:33:34+00:00]: reclaim_youtube_locked is 0
[2014-01-23T16:33:39+00:00]: reclaim_bookmarks_locked is
...
since then, no more imports:
2014-01-28T15:57:09+00:00]: END facebook import
[2014-01-28T15:57:09+00:00]: BEGIN foursquare import
[2014-01-28T15:57:09+00:00]: END foursquare import
[2014-01-28T15:57:09+00:00]: BEGIN google_plus import
[2014-01-28T15:57:12+00:00]: END google_plus import
[2014-01-28T15:57:12+00:00]: BEGIN twitter import
[2014-01-28T16:05:10+00:00]: BEGIN facebook import
[2014-01-28T16:05:10+00:00]: GETTING for facebook from https://graph.facebook.com/1156781735/feed/?limit=400&locale=en&access_token=CAAHJcZA84rz8BAPmGZC9D9Ati8gS1JZABlndFF3hy6IGIo7RmIVpeh21b6kJRfHOvlMFZCpIJjVNgjK3kKsndZAbrAhxOSGsNetrk0GN6tkswRzQ8VliOEo9f6ykaSUKfZAE751iJcuIkIX4OPu2aOEvmZCLS0PNZB9WSsUaiPExoxtuyFkiVOWc&since=1390924628
[2014-01-28T16:05:11+00:00]: END facebook import
[2014-01-28T16:05:11+00:00]: BEGIN foursquare import
[2014-01-28T16:05:11+00:00]: END foursquare import
[2014-01-28T16:05:11+00:00]: BEGIN google_plus import
[2014-01-28T16:05:13+00:00]: END google_plus import
[2014-01-28T16:05:13+00:00]: BEGIN twitter import
[2014-01-28T16:11:24+00:00]: BEGIN twitter import 1
[2014-01-28T16:15:24+00:00]: BEGIN facebook import

Any idea?

Add generic class to grab & parse RSS feeds

in the early version of reclaim we used the FeedWordPress plugin to parse RSS feeds and construct posts out of them. one of the beautys of FeedWordPress is, that itworks very well and even updates posts if the feed changes. the downside ist, that is is very complicated to configure.

we should find an easy way of configuring and parsing RSS feeds with just thes options:

  • feed adress
  • category into which post should be saved
  • designated wordpress author
  • active/not active switch

one use scenario would be a pinboard or delicious rss feed to get this out of this

add n user defined fields for function insert_posts()

https://github.com/espresto/reclaim-social-media/blob/master/mod.class.php#L64

right now there are only 3 fixed fields:

  • original_permalink
  • original_guid
  • ext_embed_code
  • ext_image

it would be nice if any value with the prefix ext_ would be put into a user defined field or as meta data.

so if i call

insert_posts($data) 

all these should be saved:

                $data[] = array(                
                    'post_status' => 'publish',
[…]
                    'ext_permalink' => $link,
                    'ext_image' => $image,
                    'ext_guid' => $entry["id"],
                    'ext_original_source_url' => $source,
                    'ext_original_source_service' => $source_service,
                    'ext_original_user_name' => $sharer_user_name,
                    'ext_original_user_id' => $sharer_user_id
              );

implement filtering/muting

right now facebook filters out some potential duplicates.
@nxD4n suggests to add that functionality to twitter.class.php.
actually we should consider that for every class.

  • mute hashtags
  • mute origins (specific facebook apps, twitter clients)
  • filter post types (no shares, no retweets, no albums, …)

Write module for Flickr

as a fingerübung. tasks:

  • save image as image post format
  • save image (original size) in media library
  • save image as featured image
  • save as much metadata as possible to custom fields
  • offer optional flickr embed code

add proper error handling

right now most errors show up in the log but not the settings page. what if an auth token expires? what if a mod or api endpoint doesn't work anymore? the user should know about it.

Adjust facebook.class.php for Facebook pages

this api endpoint works well for private profiles, but not for pages:
https://graph.facebook.com/%s/feed/?limit=%s&locale=de&access_token=%s

i don't know why, but it seems to ignore the limit parameter and prefers "since" and "until".

for pages this endpoint seems to be better:
https://graph.facebook.com/%s/posts/?limit=%s&locale=de&access_token=%s

todo:

  • let user chose what feed/posts to get (username, userid, page)
  • authentication works only as a person, but afterwards give the user a choice what should be grabbed (own/others profile, page)

Twitter's language setting is hardcoded to german

From twitter.class.php:
6: private static $lang = 'de';

This setting should probably be retrieved from WordPress or (if that's not possible) at least become a global Reclaim setting. If uncertain, "en" seems like a saner default.

Facebook sync RuntimeException

[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Contents is empty' in ...../wp-content/plugins/reclaim/vendor/euskadi31/opengraph/src/Opengraph/Reader.php:44, referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: Stack trace:, referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #0 ...../wp-content/plugins/reclaim/mod.class.php(160): Opengraph\Reader->parse(''), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #1 ...../wp-content/plugins/reclaim/mods/facebook.class.php(194): reclaim_module::insert_posts(Array), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #2 ...../wp-content/plugins/reclaim/reclaim.php(60): facebook_reclaim_module->import(true), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #3 ...../wp-content/plugins/reclaim/reclaim.php(201): reclaim_core->__construct(), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #4 [internal function]: reclaim_init(''), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #5 ...../wp-includes/plugin.php(429): call_user_func_array('reclaim_init', Array), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #6 ...../wp-settings.php(347): do_action('init'), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #7 ...../wp-config.php(90): require_once('/var/www/client...'), referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true
[Thu Jan 23 01:42:27 2014] [warn] [client 0.4.62.0] mod_fcgid: stderr: #8 /var/www/clients/cli in ...../wp-content/plugins/reclaim/vendor/euskadi31/opengraph/src/Opengraph/Reader.php on line 44, referer: http://foobar.de/wp-admin/options-general.php?page=reclaim%2Freclaim.php&settings-updated=true

Check authentication logic for Facebook class

I won’t get the Facebook class to work and suspect, that the authentication doesn’t work all right. which could also be, because the combination of facebook app and reclaim installation does not fit.

(folow up issues would be: make it more comfortable to enter facebook data, while maintaining the concept of decentralisation and not making a central facebook app to get the users oauth data)

foursquare authentication broken

As of January 28, 2014, foursquare changed its api:
"requests that do not include a v parameter will be rejected".

https://developer.foursquare.com/overview/versioning

The original request is done with hybridauth. I committed a pull request to hybridauth so this issue will be fixed there soon. Until this, you have to replace line 35 in hybridauth/hybridauth/Hybrid/Providers/Foursquare.php with $data = $this->api->api( "users/self", "GET", array("v"=>'20140131') );

Create a how-to / tutorial for the various mods

Maybe something for the non-coders observing the project:

Create a step-by-step how-to showing how to set up the individual mods in the Wiki, along with screenshots (don't forget to remove your personal api-keys before uploading them!).

Make static mod-attributes non static?

I think since we now have real class-instances and want multiple streams/channels per mod in the future we should make the attributes non static, too. What do you think?

Nice to have : favorited tweets

I was wondering if it would be possible to import also favorited tweets from https://api.twitter.com/1.1/favorites/list.json.

I hacked the twitter.class.php to do so (by cloning the do while loop and adding the list.json link), but then it should this to be another category or so (and add something like : author liked a tweet).
But then with the ongoing developpements I went back to the recent version.

plugin does not work below php version 5.3.2

on a hosted envirnonment with PHP Version 5.2.17 there's no __DIR__ (http://stackoverflow.com/questions/7452708/dir-manipulation-dir-not-working) and if you substitute __DIR__ with dirname(__FILE__) autoload_real.php aborts with a parse error.

composer requires PHP 5.3.2+, reclaim requires 5.2.4+ — i don't know if that's a too high or OK requirement. i guess it's OK.

anyways, we should prettify this error, so that the user doesn't get a

Fatal error: Class 'reclaim_module' not found in /homepages/24/xxx/wp-content/plugins/reclaim/mods/bookmarks.class.php on line 19

but a

reclaim social media requires that you run PHP ≥ 5.2.4. (you are using PHP 5.2.17)

save user data like authorisation codes with the user, not globally

what i didn't think about: the authorisation settings should be saved with the user. saving the app settings globaly, for all users, should be fine. but the twitter name, the auth codes should be saved in user_meta fields. still, on a per user basis, n users would still be nice.

implement some kind of locking

this was in my log tonight:

[2014-01-17T18:10:40+00:00]: instagram is stale
[2014-01-17T18:10:40+00:00]: BEGIN instagram import
[2014-01-17T18:10:41+00:00]: END google_plus import
[2014-01-17T18:10:41+00:00]: instagram is stale
[2014-01-17T18:10:41+00:00]: BEGIN instagram import
[2014-01-17T18:10:43+00:00]: END instagram import
[2014-01-17T18:10:43+00:00]: moves is stale
[2014-01-17T18:10:43+00:00]: BEGIN moves import
[2014-01-17T18:10:43+00:00]: END instagram import
[2014-01-17T18:10:43+00:00]: moves is stale
[2014-01-17T18:10:43+00:00]: BEGIN moves import
[2014-01-17T18:10:44+00:00]: END moves import

some importers might obviously be called twice, more or less at the same time. as soon as importing starts, it should be locked for the mod until done or ended. i sometimes end up with double entrys, because the duplicate check is excecuted to late or simutaniously.

Inconsistency using "I did something" or "Author did something"

While working on the translation I came across the fact that in some cases we use "I did something" (I Favorited a tweet) or "Author did something" (has commented on...).

I don't know how this would reflect in a mulituser environment (if any), but this must be a bit confusing.

synchronize comments and likes

had a closer look at the code of this plugin: add link to facebook

what it does is (among a lot of other stuff):

  • poll the facebook API for facebook comments and likes for each wordpress posts that has a facebook id, or rather a link to a facebook post (and thats not older than 7 days). something that posts created by the facebook.class.php always have (saved in post_meta original_guid)
  • the API response is saved with the Transients API (for 15 or 60 minutes, depending on the setting)
  • a content hook (the_content) renders the likes ("xxx, yyy liked this post") and the link to the facebook post ("View on Facebook") into the content (add-link-to-facebook-class.php, line 101 and 1982)
  • facebook coments are added as wordpress comments (there's also an option to sync wordpress comments back to facebook, which is not really a good idea)

i really like the idea to implement something like this in a more generic way, so that it works for facebook, instagram, maybe even with twitter replies and favs. it would add context to reclaimed posts and we could, for example determine, popular posts across networks, just by counting comments and a like/fav count. i also think a one way street is fine, since reclaim is not aiming at doing POSSE (post on your site, syndicate everywhere), but trying to get our own content out of the silos, without neglecting the viral and social strenght of those silos/networks.

each post created by the reclaim plugin has the original_permalink or original_guid saved in a post meta thing. so actually the only challenges would be

  • to poll the api for comments and likes on a scheduled basis,
  • cache those results (keep the load low),
  • post new comments if there are any and
  • render them

if a user deletes his or her comment beneath the original, the copy should probably also get deleted.

what the add link to facebook plugin does, can be seen in this testpost: http://architektu.rlog.de/archiv/2014/01/21/435/

Add url unshortenening

Often tweets and other social posts contain url-shortened (e.g. bit.ly, tinyurl) links. I think it'd be wise to unshorten them (follow the link and see if it results in a HTTP 30x) and replace it in-post.

New default category when activating new mod

Wondering if it would be possible to create the correspondent category when activating a new account.
(OK I'ts not a big deal, but it's a pain when filling in all the secrets and tokens you find out that you don't have the new category yet).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.