We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

**Updated** LG Twitter 2.0 - Update your twitter status from EE

Development and Programming

LHAuctioneers's avatar
LHAuctioneers
33 posts
16 years ago
LHAuctioneers's avatar LHAuctioneers

I am not.

It should be noted that this client’s site is on GoDaddy and i had a hell of a time with the force URL and path_info stuff.

       
wornjacket's avatar
wornjacket
98 posts
16 years ago
wornjacket's avatar wornjacket

Never mind, strange behaviors at first install but it works, great extension!!!

       
Todd D.'s avatar
Todd D.
460 posts
16 years ago
Todd D.'s avatar Todd D.

Anybody know if this extension supports SAEF?

       
pirco's avatar
pirco
218 posts
16 years ago
pirco's avatar pirco

is it possible to make the {category_name} available? I need to build my URLs with category names and can’t seem to make that happen. thanks.

       
dealSoft's avatar
dealSoft
7 posts
15 years ago
dealSoft's avatar dealSoft

Sorry… solved already 😊

       
LucPestille's avatar
LucPestille
146 posts
15 years ago
LucPestille's avatar LucPestille

Can someone confirm something for me - if I have a post queued that will go live in the future, and I go back to it and tick “yes, post this to twitter”, and save the entry, is the plugin aware enough to queue the tweet too?

       
LucPestille's avatar
LucPestille
146 posts
15 years ago
LucPestille's avatar LucPestille

In answer to my own question, no it doesn’t. As soon as you tick the update twitter box and save your post, it will post to your timeline. Also, {entry_id} doesn’t work in custom updates (or doesn’t work until the post is ‘live’ - I’m not sure).

       
jeremydouglas's avatar
jeremydouglas
292 posts
15 years ago
jeremydouglas's avatar jeremydouglas
{entry_id} doesn’t work.

Is it possible to get {entry_id} working?

       
LucPestille's avatar
LucPestille
146 posts
15 years ago
LucPestille's avatar LucPestille
{entry_id} doesn’t work.
Is it possible to get {entry_id} working?

It would be very useful (along with scheduling tweets) - I’m using Simon Collison’s short URL technique, which is kinda redundant without an entry ID…

       
medic119's avatar
medic119
52 posts
15 years ago
medic119's avatar medic119
{entry_id} doesn’t work.
Is it possible to get {entry_id} working?
It would be very useful (along with scheduling tweets) - I’m using Simon Collison’s short URL technique, which is kinda redundant without an entry ID…

Same thing here. {entry_id} doesn’t work here either, although it shows it in the docs. Its not listed in the variables for substitution either though.

       
joshclark17's avatar
joshclark17
194 posts
15 years ago
joshclark17's avatar joshclark17

HI Leevi -

So, I’m trying to use LG Twitter on a client site, because it would be a great feature for them to have.

I’m having some issues using 2.0.1 in tandem with Brandon Kelly’s FF Matrix in FieldFrame. When both Field Frame and LG Twitter are enabled, I lose the ability to add additional rows in my FF Matrix…the (+) completely disappears in the publish screen.

I was wondering if you have any ideas on what might be causing this. I’m kind of committed to FFMatrix, but it would be great to be able to use both for this client.

Thanks a ton for this extension. It will be really helpful.

Cheers,

Josh

       
Rushster's avatar
Rushster
11 posts
15 years ago
Rushster's avatar Rushster

Still no luck with the {entry_id} anyone managed to get that working? Unusable for me without it and I really want to use this as its exactly what I need and I love Leevi’s extensions etc.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
15 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi all,

I love this extension, but found that I need to add in URL shortening. I thought I would share with you all what I did.

Things you should know…

  1. It only uses http://bit.ly/ for the URL shortening
  2. You need to get a free username and API key

So, to get started…

  • Open /system/extensions/ext.lg_twitter_ext.php file.
  • After line 948 (which is “$twitter = new Twitter($this->settings[‘twitter_username’], $this->settings[‘twitter_password’]);”) add in:
$status = $this->_shortenURLs($status);
  • Scroll to the bottom of the file, and just before the final “}” add in:
function _shortenURLs($status)
    {
        preg_match_all('/\\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/i', $status, $matches, PREG_SET_ORDER);
        $counter = 0;
        foreach ($matches as $val) {
            $status = str_replace($matches[$counter][0], $this->_getSmallLink($val[0]), $status);
            $counter++;
        }
        return $status;
    }

    function _getSmallLink($longurl){  
    
        $login = "MYLOGIN";
        $apikey = "MYAPIKEY";
        
        $url = "http://api.bit.ly/shorten?version=2.0.1&longUrl;=$longurl&login;=$login&apiKey;=$apikey&format=json&history=1";  
      
        $s = curl_init();  
        curl_setopt($s,CURLOPT_URL, $url);  
        curl_setopt($s,CURLOPT_HEADER,false);  
        curl_setopt($s,CURLOPT_RETURNTRANSFER,1);  
        $result = curl_exec($s);  
        curl_close( $s );  
      
        $obj = json_decode($result, true);  
        return $obj["results"]["$longurl"]["shortUrl"];  
    }
  • Change “MYLOGIN” to your login
  • Change “MYAPIKEY” to your API Key

That’s it. Save the file and test it.

A couple of things I would like to further add to this extension:

  1. Allow the username and API key to be changed in the extensions settings page
  2. Add in an “Auto shorten URLs?” “yes/no” drop-down setting to the extensions settings page.
  3. Add in a checkbox to each entry to “Shorten URLs in this tweet?” in the Twitter tab.

Cheers.

Andrew…

       
Newism's avatar
Newism
30 posts
15 years ago
Newism's avatar Newism

Thanks agun,

These features are already available in the latest dev version.

GitHub: http://bit.ly/6LUcbP Settings form image: http://bit.ly/db3hIf

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
15 years ago
Andrew Gunstone's avatar Andrew Gunstone

Awww… crap!

ha ha.

       
First 2 3 4 5

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.