Hi I am wondering how to get user posts insights from Facebook API Koala Gem.
I only found solutions that works for facebook page posts but not user posts.
I used the code below for user posts but it just returns empty array.
@graph.get_connections('me', 'insights', metric: 'page_impressions', period: 'now')
UPDATE
user = Authentication.where(user_id: current_user.id, provider: "facebook").first
oauth_access_token = user.token
@graph = Koala::Facebook::API.new(oauth_access_token)
@posts = @graph.get_connection('me', 'posts',{ fields: ['id', 'message', 'link', 'name', 'description', "likes.summary(true)", "shares", "comments.summary(true)"]})
The code above works fine, but when I try to get post insights, it returns empty array.