2016-04-12 16 views
0

私はtwitter gemを使用してtwitter rest clientを実装しようとしています。URLの全長を表示したTwitterの休憩クライアント

def tweetartist 
    artist = Artist.find(params[:id]) 
    @twitter = Twitter::REST::Client.new do |config| 
     config.consumer_key = '******' 
     config.consumer_secret = '*******' 
     config.access_token = current_user.oauth_token 
     config.access_token_secret = current_user.oauth_secret 
    end 

    @twitter.update("Check out " + artist.name + " at *****! " + params[:link]) 

    if request.xhr? 
     render :json => { 
      :place => "Success" } 
    end 
    return 
    end 

のparams [:リンク] = http://localhost:3000/artists/17?refid=*****

上記作品や事前にツイートをcurrent_users壁に掲示されますが、リンク自体ではなく、青みを帯びた色であることから、完全長でありTwitterによると23文字に短縮されています。期待行動か、ここで何か間違っているのですか?

答えて

0

localhostの部分 - Twitterはそれらを単独で去っています。実際にどのように見えるかテストしたい場合は、localhost/proxyを使用できます。 http://localtest.me:3000http://localhost:3000と同じです。

関連する問題