<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sundh.com &#187; social networks</title>
	<atom:link href="http://www.sundh.com/blog/tag/social-networks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sundh.com/blog</link>
	<description>Technology / Wood / Electronics</description>
	<lastBuildDate>Thu, 19 Jan 2012 11:54:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Post to Facebook with Javascript SDK</title>
		<link>http://www.sundh.com/blog/2010/12/post-to-facebook-with-javascript-sdk/</link>
		<comments>http://www.sundh.com/blog/2010/12/post-to-facebook-with-javascript-sdk/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 12:55:12 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Connect]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.sundh.com/blog/?p=408</guid>
		<description><![CDATA[Posting a message to someones wall can contain the following parameters:

var my_message = &#8216;This is just a test!&#8217;;
var url = &#8216;http://www.sundh.com/&#8217;;
var title = &#8216;This is the name of my post&#8217;;
var desc = &#8216;Optional description of my link&#8217;;
var picUrl = &#8216;http://www.sundh.com/blog/images/led.jpg&#8217;;

To post the following to my wall this javascript code is executed:

FB.api&#40;&#8216;/me/feed&#8217;, &#8216;post&#8217;, &#123;message:my_message,link:url,name:title,picture:picUrl,description:desc &#125;,
function&#40;response&#41; &#123;
if [...]]]></description>
			<content:encoded><![CDATA[<p>Posting a message to someones wall can contain the following parameters:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="kw2">var</span> my_message <span class="sy0">=</span> <span class="st0">&#8216;This is just a test!&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> url <span class="sy0">=</span> <span class="st0">&#8216;http://www.sundh.com/&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> title <span class="sy0">=</span> <span class="st0">&#8216;This is the name of my post&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> desc <span class="sy0">=</span> <span class="st0">&#8216;Optional description of my link&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> picUrl <span class="sy0">=</span> <span class="st0">&#8216;http://www.sundh.com/blog/images/led.jpg&#8217;</span><span class="sy0">;</span></div>
</div>
<p>To post the following to my wall this javascript code is executed:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">FB.<span class="me1">api</span><span class="br0">&#40;</span><span class="st0">&#8216;/me/feed&#8217;</span><span class="sy0">,</span> <span class="st0">&#8216;post&#8217;</span><span class="sy0">,</span> <span class="br0">&#123;</span>message<span class="sy0">:</span>my_message<span class="sy0">,</span>link<span class="sy0">:</span>url<span class="sy0">,</span><span class="kw3">name</span><span class="sy0">:</span>title<span class="sy0">,</span>picture<span class="sy0">:</span>picUrl<span class="sy0">,</span>description<span class="sy0">:</span>desc <span class="br0">&#125;</span><span class="sy0">,</span><br />
<span class="kw2">function</span><span class="br0">&#40;</span>response<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span>response <span class="sy0">||</span> response.<span class="me1">error</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&#8216;Error occured&#8217;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
<span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&#8216;Post ID: &#8216;</span> <span class="sy0">+</span> response.<span class="me1">id</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>If I decided to not define the parameter &#8220;description&#8221; the post will grab the text appearing on the URL.<br />
<img class="size-full wp-image-414 alignnone" title="facebook_post" src="http://www.sundh.com/blog/wp-content/uploads/2010/12/facebook_post1.jpg" alt="facebook_post" width="360" height="186" /></p>
<h3>Youtube clip</h3>
<p>Posting a YouTube clip to someone&#8217;s wall requires a little bit different code in order to be able to play the YouTube clip within Facebook. Note that the URL to the YouTube clip is different from the URL shown in the browser when you watch the clip. Instead of &#8220;http://www.youtube.com/watch?v=VIDEO_ID&#8221;, it is set to &#8220;http://www.youtube.com/v/VIDEO_ID&#8221;. The thumbnail of the YouTube clips is easly retreived by accesing the URL &#8220;http://img.youtube.com/vi/VIDEO_ID/0.jpg&#8221;. </p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="kw2">var</span> my_message <span class="sy0">=</span> <span class="st0">&#8216;My message here&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> url <span class="sy0">=</span> <span class="st0">&#8216;http://www.youtube.com/v/VIDEO_ID&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> title <span class="sy0">=</span> <span class="st0">&#8216;Title of YouTube clip&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> desc <span class="sy0">=</span> <span class="st0">&#8216;Description of YouTube clip&#8217;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> picUrl <span class="sy0">=</span> <span class="st0">&#8216;http://img.youtube.com/vi/VIDEO_ID/0.jpg&#8217;</span><span class="sy0">;</span></div>
</div>
<p>The trick that makes the YouTube clip embeddable on Facebook is to add the parameter &#8220;source&#8221; in you API call to Facebook. The source is the same as the URL to the video clip.</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">FB.<span class="me1">api</span><span class="br0">&#40;</span><span class="st0">&#8216;/me/feed&#8217;</span><span class="sy0">,</span> <span class="st0">&#8216;post&#8217;</span><span class="sy0">,</span> <span class="br0">&#123;</span>message<span class="sy0">:</span>my_message<span class="sy0">,</span>link<span class="sy0">:</span>url<span class="sy0">,</span><span class="kw3">name</span><span class="sy0">:</span>title<span class="sy0">,</span>picture<span class="sy0">:</span>picUrl<span class="sy0">,</span>source<span class="sy0">:</span>url<span class="sy0">,</span>description<span class="sy0">:</span>desc <span class="br0">&#125;</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>response<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span>response <span class="sy0">||</span> response.<span class="me1">error</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&#8216;Error occured&#8217;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&#8216;Post ID: &#8216;</span> <span class="sy0">+</span> response.<span class="me1">id</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>The result looks like this:<br />
<img class="size-full wp-image-427 alignnone" title="facebook_youtube" src="http://www.sundh.com/blog/wp-content/uploads/2010/12/facebook_youtube.jpg" alt="facebook_youtube" width="435" height="216" /></p>]]></content:encoded>
			<wfw:commentRss>http://www.sundh.com/blog/2010/12/post-to-facebook-with-javascript-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Connect: Only for grown ups</title>
		<link>http://www.sundh.com/blog/2010/02/facebook-connect-only-for-grown-ups/</link>
		<comments>http://www.sundh.com/blog/2010/02/facebook-connect-only-for-grown-ups/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 12:03:45 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facebook Connect]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.sundh.com/blog/?p=98</guid>
		<description><![CDATA[In some Facebook Connect apps you might want to target an older audience. Any Facebook user is required to fill in their date of birth so the birthday field of the profile can be a way to check that your user has the appriopriate age for your application. This can be done by checking the [...]]]></description>
			<content:encoded><![CDATA[<p>In some Facebook Connect apps you might want to target an older audience. Any Facebook user is required to fill in their date of birth so the birthday field of the profile can be a way to check that your user has the appriopriate age for your application. This can be done by checking the birthday date of the user (birthday_date) using  the function</p>
<div class="codesnip-container" >users_getInfo($uid, &#8216;birthday_date&#8217;).</div>
<p><img class="size-medium wp-image-99 alignleft" title="birhtdate" src="http://www.sundh.com/blog/wp-content/uploads/2010/02/birhtdate-300x109.jpg" alt="birhtdate" width="300" height="109" /></p>
<p>Important to remember though is that if the Facebook user has chosen not to show the birth year, this will not be available for the Facebook Connect application. To determine that the Facebook user has the appropriate age her settings on Facebook must look as follows:</p>]]></content:encoded>
			<wfw:commentRss>http://www.sundh.com/blog/2010/02/facebook-connect-only-for-grown-ups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Facebook Connect to your blog comments</title>
		<link>http://www.sundh.com/blog/2009/12/add-facebook-connect-to-your-blog-in-8-minutes/</link>
		<comments>http://www.sundh.com/blog/2009/12/add-facebook-connect-to-your-blog-in-8-minutes/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 10:09:08 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Connect]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.sundh.com/blog/?p=44</guid>
		<description><![CDATA[This neat video explains how you can add Facebook Connect to your blog and let users add comments by logging into Facebook Connect! No server-side scripting needed!
]]></description>
			<content:encoded><![CDATA[<p>This neat video explains how you can add Facebook Connect to your blog and let users add comments by logging into Facebook Connect! No server-side scripting needed!<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="576" height="324" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.facebook.com/v/630563174283" /><param name="wmode" value="opaque" /><embed type="application/x-shockwave-flash" width="576" height="324" src="http://www.facebook.com/v/630563174283" wmode="opaque" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>]]></content:encoded>
			<wfw:commentRss>http://www.sundh.com/blog/2009/12/add-facebook-connect-to-your-blog-in-8-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prefill Facebook private messages</title>
		<link>http://www.sundh.com/blog/2009/10/prefill-facebook-private-messages/</link>
		<comments>http://www.sundh.com/blog/2009/10/prefill-facebook-private-messages/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 13:02:13 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.sundh.com/blog/?p=8</guid>
		<description><![CDATA[I just found this neat little feature on Facebook which allows you to send prefilled messages to a person on Facebook.
Fill in:
id (must be the number id)
subject (string)
message (string)
The whole link looks like this:
http://www.facebook.com/inbox/?compose&#38;id=652519918&#38;message=I%20am%20writing%20to%20you..&#38;subject=Just%20checked%20your%20blog!]]></description>
			<content:encoded><![CDATA[<p>I just found this neat little feature on Facebook which allows you to send prefilled messages to a person on Facebook.</p>
<p>Fill in:</p>
<p>id (must be the number id)<br />
subject (string)<br />
message (string)</p>
<p>The whole link looks like this:</p>
<p><a href="http://www.facebook.com/inbox/?compose&amp;id=652519918&amp;message=I%20am%20writing%20to%20you..&amp;subject=Just%20checked%20your%20blog!" target="_blank"><a href="http://www.facebook.com/inbox/?compose&amp;id=652519918&amp;message=I%20am%20writing%20to%20you..&amp;subject=Just%20checked%20your%20blog" rel="nofollow">http://www.facebook.com/inbox/?compose&amp;id=652519918&amp;message=I%20am%20writing%20to%20you..&amp;subject=Just%20checked%20your%20blog</a>!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.sundh.com/blog/2009/10/prefill-facebook-private-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

