How to programmatically pin a post to a Facebook feed? - facebook-graph-api

Does the Facebook Graph API allow you to "PIN" a post to a the top of a groups' feed? I'm unable to find any documentation on it.
Specifically, we're looking to enable this functionality for group admins (so they can pin something to the top of a groups' feed)

Having gone through the docs, I'm not sure programmatic pinning is possible, but someone from FB should vouch for it
You could alternatively star your posts like this
POST /<post_id>/ with param timeline_visibility = starred

Related

Facebook/Instagram API - Getting Popular Hashtags

I am trying to use the Instagram API for one of my projects. The task I'm trying to accomplish is getting popular hashtags based on an input keyword.
To elaborate a bit: when you're on Instagram, and start typing a hashtag, you get a popup with suggested hashtags related to what you're typing, sorted by popularity.
I'm trying to get these suggestions, but through an API call. Looking at the Instagram API docs, there is Hashtag Search as shown here, but this endpoint searches for posts which use the input hashtag, which is not what I want.
Another post suggested I have a look at Facebook Graph API instead, but again no luck there either.
I know this is possible to do as certain websites which provide services to schedule posts, like this one do it.
So, is there an endpoint in either Instagram or Facebook API that I've missed, or is there any third party API / tool that can accomplish this?
There is not currently any "trending" features as part of Instagram Graph API.

Facebook Graph API in workplace: Group post - No notifications, not appear in news feed

I created a publishing bot for group in WorkPlace that creates a post once a day. In group setting I and other members have "Nofity me about All posts".
I used group/feed path in Graph API to post a message in group
https://graph.facebook.com/{group_id}/feed
patameters: message=TestMessage
Message succesfully posts on group wall. But group members don't get any notifications about post. But they get it if member of a group posts a message.
Message also doesn't appear on news feed.
What I can do to make Workplace send notification about new post made by bot and put it on news feed?
On documentation page there is a picture of bot's post showing in news feed, so it should be possible.
Actually the behaviour is the same, if you are posting as user or with a bot. I would suggest you to open a bug to Workplace, providing the information about the wrong behaviour.

how to share page post using facebook api

There is very good and simple answer for question "how to hide page post using facebook api". Thanks a lot.
Question "i want to share friend's post via graph api" still has no answer. How come?! :)
Does anybody know how to share Post (via Graph API) from some Page (on any possible destinations: Your timeline, friends timeline, in a group …)?! Any reference to Facebook documentation will be highly appreciated.
Thanks to Maria Lucinda da Fonseca: https://groups.google.com/forum/#!topic/restfb/a94wO_KyZUM
String _destination = "me/feed"; // or "Page_id/feed"
String _linkToPost = ...;// here should be FQL stream.permalink see link to FB doc below
FacebookType publishMessageResponse =
facebookClient.publish(_destination, FacebookType.class,
Parameter.with("message", "Your message is here"),Parameter.with("link", _linkToPost ));
Also, you can share a LINK by exactly the same way: just change _destination to "me/links" or "page_id/links" and replace _linkToPost with real URL from browser or FQL link.url
FQL STREAM object
FQL LINK object
Graph api sharedposts edge
according to the above link "You cannot publish shares of an object using the Graph API."
When you attempt to use the answer provided in Maria Lucinda da Fonseca's post, Facebook graph api responds with a user error message of
"error_user_msg": "One or more of the given URLs is not allowed by the Stream post URL security app setting. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Read https://developers.facebook.com/docs/facebook-login/security/ to learn more about app settings related to security."
While it is possible to share links using the graph api, sharing facebook links is not allowed.

Facebook Graph api - post to friends timeline issue

when I tried to post to my friends timeline using facebook graph api, I got
{"error":{"message":"(#200) Feed story publishing to other users is disabled for this application","type":"OAuthException","code":200}}
Enabling something while creating access_token will resolve this problem ?
If so what should I enable.
Thanks,
Padmaprasad G
This feature has been removed the 6th February : http://developers.facebook.com/roadmap/completed-changes/
Look here how to do it Facebook App: Will fb.api method post on friend's wall?
Yes, this was announced few months back and took effect on Feb 6th - http://developers.facebook.com/roadmap/completed-changes
Removing ability to post to friends walls via Graph API
We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail. If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post.
The workaround is to use the Feed Dialog which allows users to post the same content, but choose the user they want to post it to.

Where can I find the data points for the Insights chart in the Facebook dashboard?

I am currently using the Open Graph API but am not opposed to using FQL if it can get me the data points I'd like. Right now I am just hitting the urls directly and not worrying about a client SDK.
Of the three charts on http://www.facebook.com/insights/ => websites I can find the data for the Site Engagement chart in the Domain Insights in the API.
However, I can't seem to find the points for Distribution on Facebook, or Referral Traffic to Site in the insight data being returned for the domain. Did I miss them, are they available maybe in FQL or are they just not exposed yet?
Edit: It looks like someone doesn't understand what charts I am talking about so to clarify, I am looking for the following anywhere in the Open Graph API, FQL, or anyplace else in Facebook:
Like Story Impressions
Share Story Impressions
Like Story Clicks
Share Story Clicks
This info is now available via the Insights app. News Feed section has some of it, at least the story impressions and clicks.