Superface

Social Media Publishing Profiles

social-media/publishing-profiles@1.0.1
5 providers

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

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

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
id
Profile ID
name
Profile name (non-unique)
username
Only where applicable
imageUrl
Profile image (avatar) URL

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