Social Media Publishing Profiles

social-media/publishing-profiles@1.0.1
Supported by 5 providers
F
I
L
P
T

Get Profiles for Publishing

Retrieve social media profiles (pages, accounts) the authenticated user is authorized to publish to.

Result
profiles

1.Choose a provider

2.Use GetProfilesForPublishing with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('social-media/publishing-profiles@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('GetProfilesForPublishing')
    .perform({}, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Result (object)

profiles

Example

{
  "profiles": [
    {
      "id": "110658944785122",
      "name": "Sf-test",
      "username": "sftest7904",
      "imageUrl": "https://scontent-prg1-1.xx.fbcdn.net/v/t39.30808-1/cp0/p50x50/263679317_110659048118445_8251344428401368545_n.png?_nc_cat=103&ccb=1-5&_nc_sid=dbb9e7&_nc_ohc=kN4tKgxAWdYAX_B0I6K&_nc_ht=scontent-prg1-1.xx&edm=AGaHXAAEAAAA&oh=00_AT8KpGTOc-H8gJrtOJwvNasfXrW8I27s0h1T5a8_nxUeyg&oe=61EDD39E"
    }
  ]
}

Implementation details

Provider
mock
Use case
GetProfilesForPublishing
Author
@superface
Source
Verified