Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@navjottomer
Created January 22, 2019 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navjottomer/a7b5e46b9422d367424cbe493c0137eb to your computer and use it in GitHub Desktop.
Save navjottomer/a7b5e46b9422d367424cbe493c0137eb to your computer and use it in GitHub Desktop.
This is a simple documention to use FBGroup Plugin APIs.

FBGroupAPi

This is a simple documention to use FBGroup Plugin APIs. API accept both GET and POST request.

API Call URL

API Call Parameters

apiKey:

Use apiKey generated in plugin admin dashboard to authenticate request.

fbGroupAction:

Two values are accepted for this parameter :

  • getList : To get pending item list
  • postImage : To post images to item
sinceTime:

This value only used with 'getList' value for 'fbGroupAction' It accept valid 'unix timestamp'

If sinceTime is not passed repose will contain all items without images.

itemId:

It should be a valid numeric Id of osclass item e.g. 2458

imageUrls:

Accept json encode list of image urls.

["https://facebook.com/assets/img1.jpg", "https://facebook.com/assets/img2.jpg"]

API Call Response:

FBGroupAPI respond with json on request.

Example JSON response with fbGroupAction=getList on success :

{
   "status":"success",
   "result":[
      {  "itemId":"311",
         "fbPostId":"1445816899055366_1988602004776850",
         "fbPostTime":"1543919638"
      },
      {  "itemId":"273",
         "fbPostId":"1445816899055366_1988587814778269",
         "fbPostTime":"1543919637"
      }
   ]
}
Example JSON response with fbGroupAction=getList on error :

{
  "status": "error",
  "message": "Example error message"
}
Example JSON response with fbGroupAction=postImage on success :

{
  "status": "success",
  "message": "Image uploaded to Item: itemId"
}
Example JSON response with fbGroupAction=postImage on error :

{
  "status": "error",
  "message": "Image uploaded error occured"
}

That's it for now, I hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment