Not logged in : Login

About: FacebookAPI     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • FacebookAPI
maker
Title
  • FacebookAPI
isDescribedUsing
has creator
attachment
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 facebook.sql. Note: Be sure to get the latest versions of all files, by upgrading to the latest version of the ods_framework_dav.vad package. ---++++What is the expected result? After execution of the SQL file, a type with name "DB.DBA.Facebook" 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 DB.DBA.Facebook type consists of a main object containing all the properties (api_key, api_secret) required to establish a connection to Facebook and user that is currently logged in to Facebook. * The Facebook user has no interaction with (api_key, api_secret). The developer must set api_key and api_secret. Essential part of the UDT is its property named "api_client" — * This property is of type DB.DBA.FacebookRestClient, also made available after execution of facebook.sql. * This property is the real REST client that takes care of authentication and communication to Facebook. ---+++Examples The most appropriate code example is index.vsp. Here is an annotated short code snippet: 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() ---+++ 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%
id
  • eff65cf94f9ed88cbaef8df8855b2e57
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • FacebookAPI
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:38:28Z
atom:updated
  • 2017-06-13T05:38:28Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is links to of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git132 as of May 12 2023


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3238 as of May 23 2023, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 3 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software