My new Cincopa plugin

I’ve just got a recommendation to try the  cincopa plugin for WordPress, so I did.
it works great I don’t have to deal with any encoding, uploading or embedding and i could also view this post using my iPhone and got to see the video!

I found the user interface can be adjusted so it fits humans a little better and the quality on iPhone wasn’t that great but I hear this is all being improved and their team works on this issues.

here’s a sample player and video using their platform. enjoy.

Powered by Cincopa WordPress pluginAnother great product from Cincopa Send Files. Cincopa video hosting solution for your website.

Facebook Multi-Friend-Selector in iframe application

took me two hours today to figure this one out – how to let my users invite their friend to some Facebook app I’m developing, everything I looked at sent me to the same javascript SDK solution – “just use a little of FBML and you’re all set…”. Well iframe applications in Facebook  don’t support most FBML so a server side solution is needed.

the next code snippet is nothing I wrote myself, it just took me hours to find so I thought I might as well post it here with a link to their page so it pops up higher in Google. I modified the code a little so it works inside my FB connector Class. you can find the original version here.

here is my code:

const FB_API_KEY         = 'kaklhgkajhgkjhgkjdfhgkjdhgkljsdhklsjdhgsk';
const FB_SECRET         = ';kjfdg09uq34t0jqeofpjie0pv34q';
const FB_APPID             = '12121212121212';
const FB_CANVAS_URL     = 'http://apps.facebook.com/app/';
const FB_APP_HOME_URL    = 'http://www.website.com/';
 
function SendNewRequest($to, $typeword, $content, $actionText, $bInvitation = true)
{
$facebook = self::$FB;
 
$bInviteAll = (!$to || $to == "" ? true : false);
$excludeFriends = null;
if (!$bInviteAll){
// Get all friends
$excludeFriends = $facebook->api_client->friends_get();
}else{
// Get all friends with the app
$excludeFriends = $facebook->api_client->friends_getAppUsers();
}
 
$excludeFriendsStr = null;
foreach ($excludeFriends as $userid)
{
$pos = strpos($to, (string)$userid);
if ($pos !== false)
continue;
if ($excludeFriendsStr)
$excludeFriendsStr .= ',';
$excludeFriendsStr .= $userid;
}
 
$params = array();
$params['api_key'] = self::FB_API_KEY;
$params['content'] = $content; // Don't use htmlentities() or urlencode() here
$params['type'] = $typeword;
$params['action'] = self::FB_CANVAS_URL;
$params['actiontext'] = $actionText;
$params['invite'] = ($bInvitation ? 'true' : 'false');
$params['rows'] = '5';
$params['max'] = '20';
$params['exclude_ids'] = $excludeFriendsStr;
$params['sig'] = $facebook->generate_sig($params, self::FB_SECRET);
 
$qstring = null;
foreach ($params as $key => $value)
{
if ($qstring)
$qstring .= '&';
$qstring .= "$key=".urlencode($value);
}
 
$inviteUrl  = 'http://www.facebook.com/multi_friend_selector.php?';
$facebook->redirect($inviteUrl . $qstring);
return true;
}

This code make a redirect to the selector page. I really wanted my “invite friends” button to open a popup for the friend selector but from what I read it is impossible.
if you found out how to do this or know its possible I would love to hear about it.

Pixel Bender – tv noise

I’ve always managed to avoid using Pixel Bender even though everybody around me (well not everybody just the super geeks) said it was exactly what I need.
I love the combination of technology and arts and Pixel Bender kind of lets you have fun with both and pretty fast too.
so I’ve been playing with it a little today and finally got this little cool tv noise effect (or kernel*) going.

you can view a demo of this here:
[use mouse horizontal movement for effect intensity.  click anywhere to change video feed].

you can download the kernal here, please feel free to credit me if you’re going to use this on a project.

*word of the day