Facebook external object

Official Content
This documentation is valid for:

The Facebook external object allows you to share content on Facebook and retrieve some user information from its platform.

Shareexternalobject-Location_201861393526_1_png image_201861394342_1_png

Properties

AccessToken property

Allows the developer to get the Access Token associated to an end-user logged-in via Facebook. With this token, the developer is able to get user's data from Facebook by using Facebook's GraphAPI REST Services. The information that can be queried depends on the permissions of the application (if the end user accepts them). The access information is given in an SDT called FacebookAccessToken.

Once the end user logins on the GeneXus application using Facebook (e.g. by using SD Facebook Button control or GAM authentication using Facebook), the developer can request Graph API services using HttpClient data type. See an example on HowTo: Request data from Facebook using Graph API and Access Token.

Methods

PostToWall method

Allows the end user to make a post on its Facebook's wall.

Warning: This method is deprecated as of GeneXus 15 Upgrade 8 because the Facebook’s framework has been internal changed (only link and picture paramteres are considered, other are ignored). Use Share methods instead.

Return value  None
Parameters name:Character(20), caption:Character(20), description:Character(20), link:Character(20), picture:Character(20)

Note: The link and picture parameters are URLs, and you cannot set both at the same time.

 

ShareLink method

Allows the end user to share any link on Facebook.

Return value  None
Parameters link:URL
 

 

ShareImage method

Allows the end user to share an image on Facebook.

Return value  None
Parameters image:Image
 

 

ShareVideo method

Allows the end user to share any video on Facebook.

Return value  None
Parameters video:Video
 

Events

It does not have any.

Structured Data Types

FacebookAccessToken

  • AccessToken:Character(300)
    Facebook's access token.
     
  • ApplicationId:Character(300)
    Application identifier on Facebook developer site.
     
  • UserId:Character(300)
    User identifier on Facebook's system.
     
  • Permissions:Collection(Character(20))
    List of Facebook's granted permissions.
     
  • DeclinedPermissions:Collection(Character(20))
    List of Facebook's declined permissions.
     
  • ExpirationDate:DateTime
    Date until the access token can be used (then, it must be renewed).
     
  • LastRefreshDate:DateTime
    Last date when the developer renews the access token.

Notes

  • To be able to post/share content on Facebook, the application must be registered on the Facebook developer site and have a Facebook Application created. For detailed information, refer to HowTo: Register a Facebook App for Smart Device interaction.
  • Every link must have the following notation: http://<domain>[:<port>]/<path>.
  • The feature can be used without the native application installed on the target device (except for sharing images). In such case, it will be displayed a web view of the Facebook app. 
  • The end user cannot post images without the Facebook app installed. This problem is avoided if the end user installs the Facebook native application on its device. Check the app on iTunes or PlayStore
  • The first time the application tries to post/share content on a user's wall, it will request the user to allow the Facebook Application to post on his wall. If the end user denies the request, the message cannot be posted.

Scope

Platform Smart Devices(Android, iOS).

Availability

This external object is available as from GeneXus X Evolution 3 Upgrade 3.

See also

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.