espresto / reclaim-social-media Goto Github PK
View Code? Open in Web Editor NEWreclaim your stuff from social media silos
License: GNU General Public License v2.0
reclaim your stuff from social media silos
License: GNU General Public License v2.0
I get
"Auf Google+ ursprünglich von xxxxx geteilt:"
if I share something on g+.
Can I modify the language for this?
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.
if the plugin folder's name is not "/reclaim", many mod-functions fail. recplace that with the actual value.
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?
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.
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.
I can't get the Twitter mod to sync. Doing a manual re-sync returns an empty page.
Could it be related to this announcement? https://dev.twitter.com/discussions/24239
Enabling auto-updating and having the twitter-sync enabled results in all WordPress pages returning blank.
right now theres no way to determine which mod created a post. one can guess from the original_permalink, but it might be better to have a unique identifier. especially if there are modifications or sync activities after the post is created (like comment syncing #39).
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?
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:
one use scenario would be a pinboard or delicious rss feed to get this out of this
Is there a reason why you rewrote the twitter embed code and don't let WP fetch it ?
See http://nxd4n.nixekinder.be/twitter-test/ the post is just a link to the tweet.
https://github.com/espresto/reclaim-social-media/blob/master/mod.class.php#L64
right now there are only 3 fixed fields:
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
);
if a user post an album on g+ (i.e.: https://plus.google.com/+FelixSchwenzel/posts/9AzWn2ZjABe), let the g+ class import all the attachments to the wordpress media manager, atach them to the posting and insert a gallery shortcode to show the gallery.
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.
Not sure if this is due to some Twitter API limitation, but it'd be nice to import the entire Twitter stream of a user.
html code in tweets are not escaped.
See status https://twitter.com/nxD4n/status/426308861679529984
http://nx4dn.nixekinder.be
as a fingerübung. tasks:
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.
Fatal error: Call-time pass-by-reference has been removed in .../wp-content/plugins/reclaim/reclaim.php on line 56.
http://wordpress.org/plugins/google/
didn’t get the plugin to work, but some of the code and the plugin design might be helpful in designing the google+ class.
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:
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.
strangly, for me it works all of the time, but here's another example of facebook links containing a _ in the id:
http://gr-01.de/www.re-svenk.de/?p=32
the flaw is somewhere around this line: https://github.com/espresto/reclaim-social-media/blob/master/mods/facebook.class.php#L337
i have no idea how to fix this, because i can't reproduce it.
[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
Tabs or spaces? :-)
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)
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') );
may be even better: import until dd.mm.yyyy
should probably be a bigger issue: base the plugin on a wordpress plugin boilerplate.
but one tab for each class settings would be nice.
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!).
As i was just going to set up the old version of reclaim social media (http://www.bielinski.de/2013/11/reclaim-social-media-teil-1-um-was-gehts/) and felix pointed me to this new plugin in development, i checked out the code and installed a clean wordpress instance for testing (http://reclaim2.bielinski.de/). but i'm missing the "lib"-folder, which seems to include twitter-oauth-stuff and is not included in the main branch.
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?
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.
this tweet does not get imported properly:
http://root.wirres.net/reclaim/ich-habe-einen-tweet-von-wortfeld-favorisiert/
https://twitter.com/wortfeld/status/416668354372308992
i guess its an issue here:
https://github.com/espresto/reclaim-social-media/blob/master/mods/twitter.class.php#L238
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)
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.
at this point there's no way to delete a post permanently. if you mark the post private, it gets synced again, because the duplicate check doesn't recognize the private or draft mode of a post.
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.
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.
this should be a little tweak in the mapping function.
I'm wondering why the permalink and the "leave a comment" link points to the original site.
Is this a WP setting? I would like to be able to comment on the reclaim post rather than to be redirected to the original container.
had a closer look at the code of this plugin: add link to facebook
what it does is (among a lot of other stuff):
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
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/
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.
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).
When i walked through the mods to detect the missing post-meta_data i stumbled upon another issue:
line 109 of the bookmarks-mod https://github.com/espresto/reclaim-social-media/blob/master/mods/bookmarks.class.php#L109
$post_meta["_".$this->shortname."_link_id"] = $entry["id"];
the value of $entry["id"] is not read for the ext_guid of the generated post. Shouldn't they be the same?
This differs in some other mods, so i would like to correct it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.