[Facebook]いいね!、シェアのサムネイルを動的に変える

タイトル通り
phpでmetaタグを書き変えてるだけ

サンプルfacebook TEST

こんな感じ

<meta property="og:type" content="article" />
<?php
$a="/facebook/03/";
$b=$_GET['num'];
echo '<meta property="og:title" content="FacebookTEST 0'.$b.'" />';
echo '<meta property="og:url" content="'.$a.'index.php?num='.$b.'" />';
echo '<meta property="og:image" content="'.$a.'image/a_0'. $b .'.png" />';
echo '<meta property="og:description" content="説明文 0'.$b.'" />';
?>

サムネイルが出ないとき、投稿時は出てるけどウォールで出ないときがある。
・この現象は原因がわからない。
・上記サンプルでは10回に1回くらいの確率で発生している。
・og:imageで指定する画像をpngからjpgにしたら直る? サンプルfacebook TEST S jpg
・もし固定URLならfacebookのサーバにサムネイルがキャッシュされているので
 下記参考サイトでURLを入れてデバッグをクリックすればキャッシュをクリア出来る。
・metaタグをphpで書き出しても、htmlファイルに書いてあってもこの現象には関係無さそう。
・画像のサイズを大きくしてもあまり関係無さそう。
 むしろ画像が大きいほうが失敗する確率が高いような気がする。 サンプルfacebook TEST L
・ただ単にfacebookのサーバの調子が悪いだけ?

参考にしたサイト
Debugger – Facebook開発者
http://developers.facebook.com/tools/debug

[CSS3]iPhoneのホーム画面の動きをCSS3+jsで

iPhoneのホーム画面の動きを2つの方法で制作しました。
CSS3のanimationで動かす方法と
CSS3のtransformの値をjQueryのanimateで変化させる方法。
iPhoneで閲覧した場合
前者は動的にanimationの設定をしているので
トゥイーンが始まる時にちょっと動作が止まってしまいます。
後者は滑らかです。
Firefox,Chrome,Safari,iPhoneで動きます。

サンプルCSS3 animation

サンプルCSS3 jQuery.animate of translate

[javascript]audio.js

音を出すためのjs
HTML5ではなく小さなflashを利用しているので
ほとんどのブラウザで大丈夫です。
しかし、iPhone,iPadではエラーが起きるので
下記コードみたいに条件判定するとよい。
見た目を変えたいときはaudio.jsの中にCSSの記述があるので
これを書き換える。
※追記 ソースコードをよく見たら、ブラウザによってはHTML5を使っているようです

サンプルaudio.js

var isTouch = ('ontouchstart' in window);
init_audio();
function init_audio(){
	audiojs.events.ready(function() {
		if(isTouch)return;
		audiolist=audiojs.createAll();
	});
}

参考にしたサイト
audio.js
 

[Twitter]tweet with media

twitterの画像共有APIが公開されたので遊びました。

tweet with media

参考にしたサイト

POST statuses/update_with_media | Twitter Developers
https://dev.twitter.com/docs/api/1/post/statuses/update_with_media

themattharris/tmhOAuth – GitHub
https://github.com/themattharris/tmhOAuth

Index of /projects/phpThumbnailer/
http://www.hido.net/projects/phpThumbnailer/

jQuery.uploadでアップロード画像のサムネイルの作成 | Toro-Unit Blog
http://www.torounit.com/blog/2011/05/18/735/

[ajax]Twap

GoogleMapをクリックするとクリックした地点から
半径3km以内のツイートを検索して地図にプロットします。
制作時間:2時間

Twap

[iPhone Apps]MangaPhoto(マンガフォト)

AppStoreでの公開は終了しました。

iPhoneアプリ作りました。
写真にフキダシや擬音を付けられるアプリです。
縦書き対応
Facebook、Twitpic対応
英語、日本語対応

Description
MangaPhoto is photo retouch application like japanese Manga.

[Features]
・Enable to draw a line by touching the photo
・Enable to set the line color,thickness,transparency.
・Enable to add balloon to photos.
・Enable to set text on balloon.
・Enable to add imitative sound image.
・There are 35 Balloons and 104 imitative sound images.
・You can upload image to twitpic, facebook or E-Mail.

マンガフォトは写真をマンガ風に加工できるアプリケーションです。

写真に線を引いたりフキダシを追加すること出来ます。
フキダシの文章は縦書き、横書きに対応しています。
擬音も「メメタァ」「グッパオン」「ズギュウウウン」など104種類用意してあります。
出来た画像はtwitpicやFacebookにアップロードしたり、
メールで送信することが出来ます。

Please select whether to use the photo album or to use photos taken with camera.
カメラで撮って作るかアルバムの写真を使って作るか選択して下さい。

 

You can move photo with touch.
配置された写真はタッチで移動出来ます。

 

If you touch “Pen” of the bottom.You can draw lines with touch.
画面下の「えんぴつ」をタッチするとタッチで線を描くことが出来ます。

 

If you touch “Eraser” of the bottom, You can erase lines with touch.
画面下の「消しゴム」をタッチするとタッチで線を消すことが出来ます。

 

If you touch “Setting” of the bottom, You can set status of “Pen” and “Eraser”.
画面下の「設定」をタッチすると「えんぴつ」と「消しゴム」の設定が出来ます。

 

If you touch “Balloon” of the bottom, Balloon selection screen will appear, please touch you want to place the balloon.
画面下の「フキダシ」をタッチするとフキダシ選択画面が現れますので、配置したいフキダシにタッチして下さい。

 

You can scale and rotate the balloon with your two fingers.
配置されたフキダシは二本指で拡大縮小、回転させることが出来ます。

 

If you tap the balloon twice, Balloon edit screen will appear.
フキダシをすばやく2回タッチするとフキダシ編集画面が現れ、フキダシを編集出来ます。

 

If you touch “Character” of the bottom, Character selection screen will appear, please touch you want to place the character.
画面下の「特殊文字」をタッチすると特殊文字選択画面が現れますので、配置したい特殊文字にタッチして下さい。

 

You can scale and rotate the character with your two fingers.
配置された特殊文字はフキダシと同じように二本指で拡大縮小、回転させることが出来ます。

 

If you tap the character twice, Character remove alert will appear.
特殊文字をすばやく2回タッチすると削除確認画面が現れますので、削除したい場合は「はい」をタッチして下さい。

 

If you touch “Save” of top right, Go to the save screen.
If you move the slider you can adjust the image size.
画面右上の「保存」をタッチすると
保存画面に移動します。
スライダーを左右に移動させることで画像サイズを調整出来ます。
使用しているiPhone,iPodTouchに保存するときは「アルバムに保存」
メールで送るときは「メールで送る」
Facebookにアップロードするときは「Facebookにアップロード」
Twitpicにアップロードするときは「Twitpicにアップロード」をタッチして下さい。

ちょっとだけ便利なカレンダーです。

This is a little bit handy calendar.

Rc Calendar
Rc Calendar

Rc Calendar(English)

Rc CalendarRc Calendar

Rc CalendarRc Calendar

Rc CalendarRc Calendar

[iPhoneアプリ]TwitPix

iPhoneアプリ作りました。
Objective-Cを初めて触って3週間で制作。
練習で制作し、特におもしろいところもないので次回作をお待ちください。
アプリの機能は写真を撮ってTwitpicにアップするという単純なものです。

現在は公開していません。

AppleのTwitPixページ