Class: PostForMe::Resources::SocialAccountFeeds

Inherits:
Object
  • Object
show all
Defined in:
lib/post_for_me/resources/social_account_feeds.rb,
sig/post_for_me/resources/social_account_feeds.rbs

Overview

The social account feed is every post made for the social account, including posts not made through our API. Use this endpoint to get the platform details for any post made under the connected account. To use this endpoint accounts must be connected with the "feeds" permission.

Details will include:

  • Post information including caption, url, media, etc..
  • When passing expand=metrics, Metrics information including views, likes, follows, etc..
  • For Facebook feeds with expand=metrics, page size is capped by the server-side FacebookFeedMetricsLimitCap setting (default: 10) to protect API memory usage.

Note: Currently the following platforms are supported:

  • Instagram, may take up to 48 hours for some metrics to be avaialbe
  • Facebook
  • TikTok, consumer API exposes less analytics for more details connect through TikTok Business
  • TikTok Business,
  • Youtube
  • Threads
  • X (Twitter)
  • Bluesky, Bluesky does not expose views or impressions through their API.
  • Pinterest
  • LinkedIn, metrics are only available for company pages. LinkedIn has currently stopped giving permission for personal page analytics, we are on the waitlist for when they resume.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SocialAccountFeeds

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SocialAccountFeeds.

Parameters:



76
77
78
# File 'lib/post_for_me/resources/social_account_feeds.rb', line 76

def initialize(client:)
  @client = client
end

Instance Method Details

#list(social_account_id, cursor: nil, expand: nil, external_post_id: nil, limit: nil, platform_post_id: nil, social_post_id: nil, request_options: {}) ⇒ PostForMe::Models::SocialAccountFeedListResponse

Some parameter documentations has been truncated, see Models::SocialAccountFeedListParams for more details.

Get a paginated result for the social account based on the applied filters

Parameters:

  • social_account_id (String)

    Social Account ID

  • cursor (String)

    Cursor identifying next page of results

  • expand (Array<Symbol, PostForMe::Models::SocialAccountFeedListParams::Expand>)

    Expand additional data in the response. Currently supports: "metrics" to include

  • external_post_id (Array<String>)

    Filter by Post for Me Social Postexternal ID. Multiple values imply OR logic (e.

  • limit (Float)

    Number of items to return; Note: some platforms will have different max limits,

  • platform_post_id (Array<String>)

    Filter by the platform's id(s). Multiple values imply OR logic (e.g., ?social_po

  • social_post_id (Array<String>)

    Filter by Post for Me Social Post id(s). Multiple values imply OR logic (e.g., ?

  • request_options (PostForMe::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/post_for_me/resources/social_account_feeds.rb', line 61

def list(, params = {})
  parsed, options = PostForMe::SocialAccountFeedListParams.dump_request(params)
  query = PostForMe::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/social-account-feeds/%1$s", ],
    query: query,
    model: PostForMe::Models::SocialAccountFeedListResponse,
    options: options
  )
end