Twitter、Tumber、Pinterestにそれぞれシェアするリンク

先週末あるwebサイトを作ってたときにInstagramの写真をTwitter、Tumber、Pinterestにシェアするリンクの形式を調べたのでメモ


例の中で参照している「item」はpython-instagramapiが返すオブジェクトでテンプレート言語はdjango
https://github.com/Instagram/python-instagram


twitter
初期の入力値はtextパラメータとして渡す

<a href="http://twitter.com/share?url={{item.link|urlencode}}&text={{ 'text'|urlencode }}" >twitterでシェア</a>


tumblr
初期の入力値はcaptionパラメータとして渡す

<a href="http://www.tumblr.com/share/photo?source={{ item.images.standard_resolution.url|urlencode }}&caption={{ 'caption'|urlencode }}&clickthru={{ item.link|urlencode }}">tumblrでシェア</a>


pinterest
初期の入力値はdescriptionとして渡す

<a href="http://pinterest.com/pin/create/button/?url={{ item.link|urlencode }}&media={{ item.images.standard_resolution.url|urlencode }}&description={{ 'description'|urlencode }}">pin it</a>