<docbook><section><title>OdsFacebookIntegration</title><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> ODS Facebook Integration</bridgehead>
<para> The <ulink url="FacebookAPI">Facebook API as User Defined Type (UDT)</ulink> is the basis of ODS Facebook integration.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Administrator&#39;s Integration Guide</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><emphasis><emphasis>Note:</emphasis> The steps below must be performed while logged in as the ODS Administrator (e.g., dba); regular users will then be able to use their Facebook data without doing any of this themselves.</emphasis></listitem>
</itemizedlist><orderedlist spacing="compact"><listitem>Create a FaceBook (&quot;FB&quot;) account <ulink url="http://www.facebook.com">here</ulink>.
</listitem>
<listitem>Add a Facebook developer application (from <ulink url="http://www.facebook.com/developers/editapp.php?new">this location</ulink>) to the FB account created above, by performing the following steps: <orderedlist spacing="compact"><listitem>Set the &quot;Callback URL&quot; field to: <programlisting>http://[host]:[port]/ods
</programlisting></listitem>
<listitem>Specify &quot;Canvas Page URL&quot; field value; this is the Facebook URL where the application will be available.
</listitem>
<listitem>Check the &quot;Use iframe&quot; radio-box.
</listitem>
<listitem>After the application is created successfully, copy the generated API key and Secret values shown bellow the FB application.
 The Key and the Secret values can also be found <ulink url="http://www.facebook.com/developers/apps.php">here</ulink>.
</listitem>
</orderedlist></listitem>
<listitem>Install the ods_framework_dav.vad and the rdf_mappers_dav.vad packages on a running Virtuoso database, using either the Conductor UI or the iSQL tool.
</listitem>
<listitem>Login as the dba user.
</listitem>
<listitem>Click the name of the dba user, shown as a link.
</listitem>
<listitem>Go to &quot;Edit My Profile&quot;-&gt; &quot;Applications and Web Services&quot; tab.
</listitem>
<listitem>Enter the values from above for the key={this is the API key from the FB site} and secret={this is the secret from the FB site} values in the Facebook text-area.
</listitem>
<listitem>Press &quot;Save&quot;.
</listitem>
<listitem>After successful execution of this list of actions integration setup is complete.</listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">User Interface</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><emphasis><emphasis>Note:</emphasis> The steps below can be performed by each ODS user after the <emphasis>Administrator&#39;s Integration Guide</emphasis> steps above have been completed by the ODS Administrator (e.g., dba).</emphasis></listitem>
</itemizedlist><orderedlist spacing="compact"><listitem>Login as an ODS user in http://[host]:[port]/ods </listitem>
<listitem>Click the ODS icon in the beginning of the ODS Navigation bar.
</listitem>
<listitem>You will be redirected to you ODS Home page (myhome.vspx).
 In the second line of the ODS-BAR (header), next to the links &quot;Edit my profile&quot; and &quot;My applications&quot;, you should see the link &quot;My Facebook&quot;.
<figure><graphic fileref="OdsFacebookIntegration/fb1.png" /></figure> <emphasis><emphasis>Note:</emphasis> You may need to make sure your ODS bar is set to full mode (by clicking the arrow shown at the left of the ODS Menu bar).</emphasis> </listitem>
<listitem>Click the link &quot;My Facebook&quot;.
</listitem>
<listitem>You should be redirected to the Facebook front page in ODS with URL: <programlisting>http://[host]:[port]/ods/fb_front.vspx 
</programlisting><figure><graphic fileref="OdsFacebookIntegration/fb2.png" /></figure> Note: <itemizedlist mark="bullet" spacing="compact"><listitem>The link &quot;My Facebook&quot; will be shown for all regular users once the ODS Administrator has performed the steps from the <emphasis>Administrator&#39;s Integration Guide</emphasis>.
</listitem>
<listitem>ODS depends on the &quot;dba&quot; Facebook setting and will ignore any regular user setting when it generates data for fb_front.vspx.
</listitem>
<listitem>Data generated on fb_front.vspx corresponds to the user that is logged to Facebook, not to the user that created the development application.</listitem>
</itemizedlist></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Functionality of the fb_front.vspx page:</bridgehead>
 <itemizedlist mark="bullet" spacing="compact"><listitem>If the Facebook and ODS accounts are not associated, or if only one account is registered: <itemizedlist mark="bullet" spacing="compact"><listitem>ODS user is given information about the Facebook user that is currently logged to Facebook (from that same browser) </listitem>
<listitem>ODS user is given information about the Facebook user&#39;s friends </listitem>
<listitem>ODS user is given information about status of Facebook to ODS user integration </listitem>
<listitem>ODS user is able create a new ODS user that is automatically associated with the Facebook account.
</listitem>
<listitem>ODS user is able to associate their ODS account with the logged-in Facebook account </listitem>
</itemizedlist></listitem>
<listitem>If the ODS user has Facebook and ODS accounts which are associated.
<itemizedlist mark="bullet" spacing="compact"><listitem>ODS user is able to disassociate the Facebook account from the ODS account </listitem>
<listitem>ODS user is able create ODS-AddressBook and to import Facebook friends as contacts in it.
</listitem>
<listitem>ODS user is able to update their ODS-AddressBook (that already exists) contacts based on Facebook friends info.
</listitem>
<listitem>Data for Facebook friends of the logged-in user is automatically imported as RDF.
<itemizedlist mark="bullet" spacing="compact"><listitem>Information is updated each time user goes to this page.
</listitem>
<listitem>After successful RDF data extraction, &quot;rdf&quot; icons - <figure><graphic fileref="OdsFacebookIntegration/rdf.png" /></figure> - alongside Facebook friend names become anchors that will render the RDF data about them which has been imported to Virtuoso RDF store.</listitem>
</itemizedlist></listitem>
</itemizedlist></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Behavior of the &quot;Synchronize All&quot; page</bridgehead>
 <orderedlist spacing="compact"><listitem>Click the &quot;Synchronize&quot; link in the &quot;ODS User info&quot; block.
</listitem>
<listitem>The &quot;Synchronize all&quot; interface will be opened.
<figure><graphic fileref="OdsFacebookIntegration/fb3.png" /></figure> </listitem>
<listitem>Click the &quot;Synchronize All&quot; button.
</listitem>
<listitem>All existing contacts will be updated (using the first contact that matches synchronization criteria) in ODS-AddressBook using default/custom mapping.
</listitem>
<listitem>The user is able to set a custom mapping for synchronization using the &quot;Set default mapping&quot; block.
 If the user does not set custom mapping, then the default mapping will be used.</listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Functionality of the &quot;all contacts to synchronize&quot; page</bridgehead>
 <orderedlist spacing="compact"><listitem>Click the &quot;Show all contacts to synchronize&quot; link.
</listitem>
<listitem>The  &quot;all contacts to synchronize&quot; page will be opened.
<figure><graphic fileref="OdsFacebookIntegration/fb4.png" /></figure> <orderedlist spacing="compact"><listitem>The user is offered the option to synchronize his/her contacts one-by-one.
<itemizedlist mark="bullet" spacing="compact"><listitem>The UI presents separate blocks for each FB friend.
</listitem>
<listitem>The user is offered all available field value matches for Facebook friends in their ODS-AddressBook contacts.
</listitem>
<listitem>By default, the first match is selected.
</listitem>
<listitem>The user can change the matching criteria for the synchronization.
</listitem>
<listitem>Facebook and ODS-AddressBook contacts are presented with links, so the data for them can be compared, and the right matching pair can be chosen.
</listitem>
</itemizedlist></listitem>
<listitem>There is a choice to use default or manual mapping for contact properties.
<itemizedlist mark="bullet" spacing="compact"><listitem>The <emphasis>Default mapping</emphasis> can be set by clicking the link &quot;Set Default Mapping&quot;.
<orderedlist spacing="compact"><listitem>This feature offers the ability to synchronize in groups.
</listitem>
<listitem>When the Default mapping is set, you can click the &quot;Default&quot; button for contacts and proceed further.
</listitem>
</orderedlist></listitem>
<listitem><emphasis>Manual mapping</emphasis> can be set by clicking the &quot;Manual&quot; button from the combo button available for each user.
<orderedlist spacing="compact"><listitem>The user will be asked to set mapping, and then contact synchronization is executed.</listitem>
</orderedlist></listitem>
</itemizedlist></listitem>
</orderedlist></listitem>
</orderedlist><para><ulink url="CategoryODS">CategoryODS</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink> <ulink url="CategoryVirtuoso">CategoryVirtuoso</ulink> <ulink url="CategoryHowTo">CategoryHowTo</ulink> <ulink url="CategoryFacebook">CategoryFacebook</ulink> <ulink url="CategoryOdsAddressBook">CategoryOdsAddressBook</ulink> <ulink url="CategoryAddressBook">CategoryAddressBook</ulink></para>
<para> </para>
</section></docbook>