2015-10-05 13 views
5

TwitterとFacebookの共有機能をテストしています。私は現在、Twitterの共有ボタンをテストしていlocalhostのTwitterカードバリデータ

は、私はmetaタグで、私は私のためにリンクバック私のつぶやきにつぶやき(埋め込みTwitterの画像を埋め込むことができるようにことがわかった検索の数時間後に追加しました私のサイト)私はツイッターカードが必要です。

マイメタコード:

<meta name="twitter:card" content="summary_large_image"> 
    <meta name="twitter:site" content="http://MY_IP_ADDRESS:3000/"> 
    <meta name="twitter:creator" content="@random"> 
    <meta name="twitter:title" content="Parade of Fans for Houston’s Funeral"> 
    <meta name="twitter:description" content="NEWARK - The guest list and parade of limousines with celebrities emerging from them seemed more suited to a red carpet event in Hollywood or New York than than a gritty stretch of Sussex Avenue near the former site of the James M. Baxter Terrace public housing project here."> 
    <meta name="twitter:image" content="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg"> 

次にように見えるシェアボタン:私はハッシュタグをツイートした場合、それは私の画像をピックアップしたり、それをツイートしていません

<img src="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg"> 
    <a href="https://twitter.com/intent/tweet?button_hashtag=test" data-url="http://localhost.share.com/" target="_blank">Tweet #test</a> 
    </img> 

。だから、私は自分のサイトを実行しようとしている(私はそのようにテストしている私のlocalhostのTwitterのカード検証ツール)https://cards-dev.twitter.com/validator

私は、このエラーメッセージが表示されます:error message

私が間違って何をやったか任意のアイデア?なぜ私はIPアドレスを使用できないので、Twitterカードをテストできますか?

ありがとうございます!

+0

適切なタグを付けてください!これは 'facebook'とはほとんど関係がなく、' twitter-boostrap'ではまったく何もありません。 (タグは削除されました。) – CBroe

答えて

5

私はこれをここに残しておくと誰もがこれにつまずくと思いました。私がこの質問をしばらく前に尋ねて以来、私は実際にはその問題を覚えていませんが、ngorkを使うのが最も簡単な解決策です。

https://ngrok.com/

ダウンロードngrok。ローカルサーバーが実行されているポートにngrok指し、それはあなた自身使用するようにURLが...

Session Status    online                             
Version      2.1.18                             
Region      United States (us)                          
Web Interface     http://127.0.0.1:4040                          
Forwarding     http://65hkdy7ed.ngrok.io -> localhost:3000                    
Forwarding     https://65hkdy7ed.ngrok.io -> localhost:3000 

そして、そこの線に沿って何かを吐き出すだろうその後、ローカルサーバーを実行します:)