This HTML5 document contains 37 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n11http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n4http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
dchttp://purl.org/dc/elements/1.1/
n6http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n12http://rdfs.org/sioc/services#
siocthttp://rdfs.org/sioc/types#
n14http://vos.openlinksw.com/dataspace/person/dav#
n2http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n10http://vos.openlinksw.com/wiki/main/VOS/FacebookAPI/facebook.
n19http://vos.openlinksw.com/wiki/main/VOS/FacebookAPI/index.
n8http://vos.openlinksw.com/dataspace/owiki#
n21http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/FacebookAPI/sioc.
xsdhhttp://www.w3.org/2001/XMLSchema#
n9http://vos.openlinksw.com/dataspace/%28NULL%29/wiki/VOS/
n15http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n14:this
foaf:made
n4:FacebookAPI
Subject Item
n6:this
sioc:creator_of
n4:FacebookAPI
Subject Item
n11:item
n12:services_of
n4:FacebookAPI
Subject Item
n8:this
sioc:creator_of
n4:FacebookAPI
Subject Item
n2:VOS
sioc:container_of
n4:FacebookAPI
atom:entry
n4:FacebookAPI
atom:contains
n4:FacebookAPI
Subject Item
n4:FacebookAPI
rdf:type
sioct:Comment atom:Entry
dcterms:created
2017-06-13T05:38:28.579558
dcterms:modified
2017-06-29T07:34:50.006253
rdfs:label
FacebookAPI
foaf:maker
n14:this n15:this
dc:title
FacebookAPI
opl:isDescribedUsing
n21:rdf
sioc:has_creator
n8:this n6:this
sioc:attachment
n10:sql n19:vsp
sioc:content
%VOSWARNING% %VOSNAV% ---++Facebook Client API as User Defined Type (UDT) ---+++What is it for? The API gives developers an easy way to communicate with Facebook, handling authentication with transparent communication. It may be used with any VSP or VSPX page, not just ODS. ---+++How to use it? To use the API, you should execute <code><a href="%ATTACHURLPATH%/facebook.sql" style="wikiautogen">facebook.sql</a></code>. Note: Be sure to get the latest versions of all files, by upgrading to the latest version of the <code><nowiki>ods_framework_dav.vad</nowiki></code> package. ---++++What is the expected result? After execution of the SQL file, a type with name "<code>DB.DBA.Facebook</code>" will be created. Creating an object of this type with the correct parameter(s) will set up a functional REST client for Facebook. ---+++Description of usage: * The <code>DB.DBA.Facebook</code> type consists of a main object containing all the properties (<code><nowiki>api_key</nowiki></code>, <code><nowiki>api_secret</nowiki></code>) required to establish a connection to Facebook and user that is currently logged in to Facebook. * The Facebook user has no interaction with (<code><nowiki>api_key</nowiki></code>, <code><nowiki>api_secret</nowiki></code>). The developer must set <code><nowiki>api_key</nowiki></code> and <code><nowiki>api_secret</nowiki></code>. Essential part of the UDT is its property named "<code><nowiki>api_client</nowiki></code>" &mdash; * This property is of type <code><nowiki>DB.DBA.FacebookRestClient</nowiki></code>, also made available after execution of <code><nowiki>facebook.sql</nowiki></code>. * This property is the real REST client that takes care of authentication and communication to Facebook. ---+++Examples The most appropriate code example is <a href="%ATTACHURLPATH%/index.vsp" style="wikiautogen">index.vsp</a>. Here is an annotated short code snippet: <verbatim> DECLARE appapikey, appsecret VARCHAR; DECLARE _facebook DB.DBA.Facebook; DECLARE _user INTEGER; -- here you should put the 32-character API key that corresponds to the application you have -- created in Facebook . appapikey := '5568c178ad6a4cef74da4848b164602c'; -- here you should put the 32-character API secret that corresponds to the application you have -- created in Facebook. appsecret := 'f35a624a0c9d153a6fa712a439bea14b'; _facebook := new Facebook(appapikey, appsecret, params, lines); -- Constructor method for the UDT should contain 4 obligatory parameters - -- API key, API secret, params, and lines parameters available in VSP -- With this action the API is set up. -- To work with Facebook data, we must make the Facebook user login _user := _facebook.require_login(); -- after successful login, _user is INTEGER that contains Facebook user ID. -- All further communication to Facebook is related to api_client property: -- for example if we want to take full name of current user: DECLARE _xmle ANY; _xmle:=_facebook.api_client.users_getInfo(CAST(_user AS VARCHAR),'name'); -- Here we cast _user as VARCHAR, as the first parameter is comma-separated list of -- the users IDs for which we need the field "name". On successful execution, _xmle -- will contain xml entity with the result. We should parse it in order to get what -- we need from result. For example, if we need name as VARCHAR we can -- perform the following: DECLARE _uname VARCHAR; _uname:=CAST(xpath_eval('/users_getInfo_response/user/name', _res) AS VARCHAR); METHOD auth_getSession ( auth_token ANY ) RETURNS ANY, METHOD users_getInfo ( uids ANY, fields ANY ) RETURNS ANY, METHOD users_isAppAdded () RETURNS ANY, METHOD friends_areFriends ( uids1 ANY, uids2 ANY ) RETURNS ANY, METHOD friends_get () RETURNS ANY, METHOD events_get ( uid INTEGER, eids ANY, start_time INTEGER, end_time INTEGER, rsvp_status VARCHAR ) RETURNS ANY, METHOD events_get ( uid INTEGER ) RETURNS ANY, METHOD events_getMembers ( eid INTEGER ) RETURNS ANY, METHOD fql_query ( _query VARCHAR ) RETURNS ANY, METHOD feed_publishStoryToUser ( title VARCHAR, body VARCHAR, image_1 VARCHAR, image_1_link VARCHAR, image_2 VARCHAR, image_2_link VARCHAR, image_3 VARCHAR, image_3_link VARCHAR, image_4 VARCHAR, image_4_link VARCHAR, priority INTEGER ) RETURNS ANY, METHOD feed_publishStoryToUser ( title VARCHAR, body VARCHAR ) RETURNS ANY, METHOD feed_publishActionOfUser ( title VARCHAR, body VARCHAR, image_1 VARCHAR, image_1_link VARCHAR, image_2 VARCHAR, image_2_link VARCHAR, image_3 VARCHAR, image_3_link VARCHAR, image_4 VARCHAR, image_4_link VARCHAR, priority INTEGER ) RETURNS ANY, METHOD feed_publishActionOfUser ( title VARCHAR, body VARCHAR ) RETURNS ANY, METHOD friends_getAppUsers () RETURNS ANY, METHOD groups_get ( uid INTEGER, gids ANY ) RETURNS ANY, METHOD groups_getMembers ( gid INTEGER ) RETURNS ANY, METHOD notifications_get () RETURNS ANY, METHOD notifications_send ( to_ids ANY, notification VARCHAR, email VARCHAR ) RETURNS ANY, METHOD notifications_sendRequest ( to_ids ANY, type VARCHAR, content VARCHAR, image VARCHAR, invite INTEGER ) RETURNS ANY, METHOD photos_get ( subj_id INTEGER, aid INTEGER, pids ANY ) RETURNS ANY, METHOD photos_getAlbums ( uid INTEGER, aids INTEGER ) RETURNS ANY, METHOD photos_getTags ( pids ANY ) RETURNS ANY, METHOD profile_setFBML ( markup VARCHAR, uid INTEGER ) RETURNS ANY, METHOD profile_getFBML ( uid INTEGER ) RETURNS ANY, METHOD fbml_refreshImgSrc ( _url VARCHAR ) RETURNS ANY, METHOD fbml_refreshRefUrl ( _url VARCHAR ) RETURNS ANY, METHOD fbml_setRefHandle ( _handle VARCHAR, fbml VARCHAR ) RETURNS ANY -- You can find description for every method at the beginning of the method -- definition in facebook.sql or in http://wiki.developers.facebook.com/index.php/API -- there are 3 methods that are related to REST communication but not to API function. METHOD generate_sig ( params_array ANY, secret VARCHAR ) RETURNS VARCHAR, METHOD call_method ( method VARCHAR, params ANY ) RETURNS ANY, METHOD post_request ( method VARCHAR, params ANY ) RETURNS ANY, -- all functions return XML entity as result, except -- auth_getSession(), -- users_getInfo(uids ANY, fields ANY), and -- users_isAppAdded() </verbatim> ---+++ Usage of the Facebook Client API as UDT in ODS Usage of this UDT in ODS is [[OdsFacebookIntegration][covered elsewhere]]. CategoryODS CategoryOpenSource CategoryVirtuoso CategoryHowTo CategoryFacebook CategoryUDT %VOSCOPY%
sioc:id
eff65cf94f9ed88cbaef8df8855b2e57
sioc:link
n4:FacebookAPI
sioc:has_container
n2:VOS
n12:has_services
n11:item
atom:title
FacebookAPI
sioc:links_to
n9:CategoryUDT n4:CategoryOpenSource n9:CategoryFacebook n4:CategoryVirtuoso n4:CategoryHowTo n4:CategoryODS
atom:source
n2:VOS
atom:author
n14:this
atom:published
2017-06-13T05:38:28Z
atom:updated
2017-06-29T07:34:50Z
sioc:topic
n2:VOS