Tweetbacks not working
Tweetbacks not working
Hi,
I think I got something wrong in the tweetback settings: Once again I just stumbled upon a tweet where one of my articles is linked (using a different short urler), but I do not get any tweetbacks. The attachment shows my settings do I do anything wrong, or how could I correct that?
Or may be the backtweet api is not working?
Daniel
I think I got something wrong in the tweetback settings: Once again I just stumbled upon a tweet where one of my articles is linked (using a different short urler), but I do not get any tweetbacks. The attachment shows my settings do I do anything wrong, or how could I correct that?
Or may be the backtweet api is not working?
Daniel
- Attachments
-
- Tweetback Configuration
- Configure Plugins - Serendipity Administration Suite (20110421).jpg (238.01 KiB) Viewed 6296 times
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetbacks not working
Hi!
Detecting tweetbacks is not really easy, due to the many different linkshorteners. And backtweet is also quite unstable and often hit by API limits...
Which linkshortener was used exactly, which missing tweeback are you referring to?
Regards,
Garvin
Detecting tweetbacks is not really easy, due to the many different linkshorteners. And backtweet is also quite unstable and often hit by API limits...
Which linkshortener was used exactly, which missing tweeback are you referring to?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Tweetbacks not working
Basically, since about January I did not receive any Tweetback anymore. And at least there are some.
Why not make the Tweetback-checking using plain twitter search:
If I search for my domain "scrmblog.com" I get all tweets referring to me even those which are using short urls and do not mention my blog directly.
Daniel
Why not make the Tweetback-checking using plain twitter search:
If I search for my domain "scrmblog.com" I get all tweets referring to me even those which are using short urls and do not mention my blog directly.
Daniel
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetbacks not working
Hi!

When they use short urls, you do not know for which string to search. You must always search every link shortening service for your own URL and see if they have it in their database, and THEN you can use the twittersearch to search for that string. But this is already how the plugin does it.
The backtype api is only optionally used to bypass the need to query every link shortening services...
If you are missing specific tweetbacks, we can try to analyze why this is happening, but for that I would need the actual tweetids, and they may not be too old because if they are, the twitter serach API no longer finds them...
Regards,
Garvin
How would you do that?danst0 wrote:Why not make the Tweetback-checking using plain twitter search:
If I search for my domain "scrmblog.com" I get all tweets referring to me even those which are using short urls and do not mention my blog directly.
When they use short urls, you do not know for which string to search. You must always search every link shortening service for your own URL and see if they have it in their database, and THEN you can use the twittersearch to search for that string. But this is already how the plugin does it.
The backtype api is only optionally used to bypass the need to query every link shortening services...
If you are missing specific tweetbacks, we can try to analyze why this is happening, but for that I would need the actual tweetids, and they may not be too old because if they are, the twitter serach API no longer finds them...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Tweetbacks not working
Hi,
ok, for using the search function in twitter: Twitter seams to resolve and search the full url internally. Have a look at these search results: https://twitter.com/#!/search/scrmblog.com. There is not a single one with the full url...
Daniel
ok, for using the search function in twitter: Twitter seams to resolve and search the full url internally. Have a look at these search results: https://twitter.com/#!/search/scrmblog.com. There is not a single one with the full url...
I don't know how to find the tweet ids. But you can have a look at any of the search results above, none has any tweetbacks.If you are missing specific tweetbacks, we can try to analyze why this is happening, but for that I would need the actual tweetids, and they may not be too old because if they are, the twitter serach API no longer finds them...
Daniel
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetbacks not working
Hi!
Yes, but the plugin matches the results of the twitter search to your local entries; and if the URL in there does not correspond to a created one, it cannot be associated to your blog entry.
Sadly I didn't code the tweetback/backtweet thing, and it is quite complex, so I can't really offer much more input...
How's your setup, did you use backtype API or not? Using backtype fully shortcircuits the logic and does not perform lookups to bit.ly etc., so you might want to disable backtype API to see if that creates tweetbacks for you in the future...
Regards,
Garvin
Yes, but the plugin matches the results of the twitter search to your local entries; and if the URL in there does not correspond to a created one, it cannot be associated to your blog entry.
Sadly I didn't code the tweetback/backtweet thing, and it is quite complex, so I can't really offer much more input...
How's your setup, did you use backtype API or not? Using backtype fully shortcircuits the logic and does not perform lookups to bit.ly etc., so you might want to disable backtype API to see if that creates tweetbacks for you in the future...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Tweetbacks not working
Thats the cool thing: You can also search for the full url and get the associated tweets back (including short urled)! As far as I understand the code right now it is done similarly, every time an article is called its url is checked at tweetback or the other services, so instead of doing this it could just check the twitter search using the full article url.Yes, but the plugin matches the results of the twitter search to your local entries; and if the URL in there does not correspond to a created one, it cannot be associated to your blog entry.
I just disabled tweetback, so let's see if that works.
Daniel
Re: Tweetbacks not working
Ok, I enabled logging in the twitter plugin to trace the error.
First obstacle: No log file is being generated, I click the link under the articles to check for a trackback and beside the negative result nothing is logged, but as far as I understand the code it should be...
Daniel
Code: Select all
// writes a debug log into templates_c
@define('PLUGIN_TWITTER_DEBUG', True);Daniel
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetbacks not working
Hi!
When that var is enabled, the $this->log() should create a logfile. Did you check templates_c/serendipity_event_twitter.log? That's what it should default to...
I haven'T checked if the $this->log() method is called anywhere when a trackback is checked, but I see multiple occurrences...
For starters you could patch $this->log() to not only write the output, but simply echo it back to your HTML output.
HTH,
Garvin
When that var is enabled, the $this->log() should create a logfile. Did you check templates_c/serendipity_event_twitter.log? That's what it should default to...
I haven'T checked if the $this->log() method is called anywhere when a trackback is checked, but I see multiple occurrences...
For starters you could patch $this->log() to not only write the output, but simply echo it back to your HTML output.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Tweetbacks not working
Up to now I haven't found the log file anywhere on the server.garvinhicking wrote: When that var is enabled, the $this->log() should create a logfile. Did you check templates_c/serendipity_event_twitter.log? That's what it should default to...
All functions within the serendipity_event_twitter.php which start with "function check_tweetbacks" contain (I added it to the one that did not).I haven'T checked if the $this->log() method is called anywhere when a trackback is checked, but I see multiple occurrences...
I extended the log function byFor starters you could patch $this->log() to not only write the output, but simply echo it back to your HTML output.
Code: Select all
echo "Logging";Daniel
ps: to be sure that I am editing the correct file I just put an echo into
Code: Select all
function introspect(&$propbag)Re: Tweetbacks not working
Ok, now I finally found a tweet on one of my articles. It is detected, when I press the "check for tweetback" buttons, but: it is not added as a trackback???
It is also not from my twitter account which is excluded and not in the recycler.
Daniel
ps. there is no entry in the log as well.
It is also not from my twitter account which is excluded and not in the recycler.
Daniel
ps. there is no entry in the log as well.
Re: Tweetbacks not working
Hi Garvin,
I now found at least the reason why the tweetback plugin does not return all search results from twitter, when I type in a full url:
If you have a full_url (=domain.com/path/to/article) and enter it into the twitter search, you get all tweets that refer to this url, no matter if short or long, so basically perfect.
Now all the twitter plugin had to do was to search for full_url and use the results, but instead the plugin checks if the searched string is contained in the tweet (in Twitter.php 126-136):
But this does not make sense since now we remove perfectly valid results which contain a short_url which points towards the full_url from the results.
I commented this part, and now at least all tweets for an entry are found, when I hit "check for tweetbacks".
I would suggest to remove this code from classes/Twitter.php, what do you say?
Daniel
ps. for this to work fully you have to include "uncompressed" in the "Tweetback Check Services" in the configuration. Better yet, the short url options there could be removed.
I now found at least the reason why the tweetback plugin does not return all search results from twitter, when I type in a full url:
If you have a full_url (=domain.com/path/to/article) and enter it into the twitter search, you get all tweets that refer to this url, no matter if short or long, so basically perfect.
Now all the twitter plugin had to do was to search for full_url and use the results, but instead the plugin checks if the searched string is contained in the tweet (in Twitter.php 126-136):
Code: Select all
$checkfound = false;
foreach ($checkresultfor as $check) {
if (strpos($item->text,$check)) {
$checkfound =true;
break;
}
}
// if short url was not found *exactly* continue to next entry:
if (!$checkfound) {
continue;
}I commented this part, and now at least all tweets for an entry are found, when I hit "check for tweetbacks".
I would suggest to remove this code from classes/Twitter.php, what do you say?
Daniel
ps. for this to work fully you have to include "uncompressed" in the "Tweetback Check Services" in the configuration. Better yet, the short url options there could be removed.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetbacks not working
Hi!
Wow! Great work! Thanks so much. I've committed your change, and I make sure that 'raw' is always included in the search.
Let's see how this works out
Regards,
Garvin
Wow! Great work! Thanks so much. I've committed your change, and I make sure that 'raw' is always included in the search.
Let's see how this works out
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/