how to tag a facebook profile from graph api - ruby-on-rails

I want to post to a facebook page through API. I created a access token in the graph api explorer. I am able to successfully post to a page. I am trying to mention a person I am not able to. The old #[id:name] is not working. But there seems to be a way with this. But the issue is I am not able to tag because it wants me to enable tagging in actiontypes.
After enabliing Tags in the Action Types section of the App Dashboard, add a tags parameter to your action publishing call, where tags is a comma separated list of tagging tokens for each person. These tagging tokens are retrieved using the /user/taggable_friends Graph API edge.
When I click the link for action types it asks me for a app but it is not showing graph api. Is there something fundamentally wrong with what I am trying. How to proceed? I am using the Koala gem.

Not sure if I understood you correctly, but if you want to tag some friends within a post, you should use the /me/taggable_friends endpoint to get a list of friends:
https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends/
Then, you can use those to fill the message_tags of the respective post:
https://developers.facebook.com/docs/graph-api/reference/v2.3/post

Related

Facebook-Ios get the number of users i have just tagged in a post, some questions

I wanna get the number of users i have just tagged in a post (in my profile) by Facebook sdk. I have read about:
FBSDKShareLinkContent
FBSDKSharePhoto
But seems that theri delegation doesn't return anything about the number of friends tagged, so i can't use it.
Maybe an alternative is a custom friends picker and a share action with Graph api, something like:
Login with fb -> UiTableview with content filled with graph endpoint "taggable_friends" -> launch the share action -> Return the number of tagged friends
My question are:
There is a way with graph api to know how many friends are tagged in a post (i have to post in my own profile)?
If the endpoint "taggable_friends" is deprecated (i can't find in Graph explorer), what is the actual alternative ?
"taggable_friends" returns only friends how have already my fb app installed or all my friends?
First of all, what do you need this information for?
Please be aware that you are not allowed to “reward” users in any way for posting or tagging people, or to require them to tag a certain number of people or something like that. If you haven’t done so already, you should go read Platform Policy.
taggable_friends is not deprecated, and it returns all friends, not just app users.
If you have a legitimate use case for finding out how many people where tagged, you could read the post details back from the API, after the post is made. The message_tags field contains info about the tags, so you could simply check how many elements this field contains. (I don’t know though how tag review affects this, if people have their FB settings so that they need to confirm being tagged first.)

Tweeting as different user using REST API

I'm currently writing a shop-related site that has it's own community in different social networks. While posting to VKontakte and Facebook is less of an issue (I can understand the concept of "group", and VK actually has an option to write posts using the group's name), Twitter is more troublesome.
Two questions:
Is there even such a thing as "groups" in Twitter? The closest I have seen is lists and timelines, but neither appears to solve my issue.
I cannot give the operator access to the twitter account. VK has a specific option when posting in a group to use that group's name as poster name. How does this work in Twitter?
I need something akin to what lamoda has set up. (It appears to be a user, and every post is labeled as written by that user, however I doubt they give their ops access to the actual twitter account).
P.S.: I'm already done with getting past OAuth and using REST to actually post, thus no code provided. I'm just having trouble with the statuses/update.json call, if that's what I should actually be using.
Talk about simple solutions to simple problems.
It appears I have been overcomplicating. There are no groups in twitter, or even comments at that. You can only post to your own feed or re-post from somebody else's.
Posting to someone's feed (a shop account's, say) is simple enough using that account's pre-generated access token which can be stored in the configs.

Google search results "plus.google.com" entry

I made a Website for a client.
Now when I search for him the result looks like this:
You can see the fourth entry is somewhat of a special entry and I don't understand where this entry is coming from?
Is this an automated google+ page? I've just created a google places entry but never a google+ page.
How di I get rid of this search result?
Google Places entries show up in Google+ Local. They do not have a Google+ Page associated with them by default, but you can convert your entry to a place to enable more functionality and to hook the entry up with your site by using the badge code or the more minimal direct connect metadata link to verify your website on the Google+ Local page.
Associating your site with the Google+ Local page, should help with search too and provide people with a method to get directly to your site until the website starts showing up in the search index from being crawled.

How do I get the retweet_count of a given tweet WITHOUT user interaction?

I have a list of tweets that are using a hashtag I made. I'm getting these tweets using the search api. All I want is to get the number of retweets. I DO NOT need to post on their behalf. It seams ridiculous that I would need to have every single user login to my site, login to twitter and approve my application via OAUTH for EVERY TWEET IN MY LIST. There's gotta be a way to get that number without the need for oauth.
I tried getting it directly from the search api, but that's not consistently there. I've tried https://api.twitter.com/1/statuses/show/275729088709283840.json but that doesn't work, for some reason. Is there anyway to do this extremely simple task without going down the asinine road of user-interaction?
You have to create a background-process that uses the stream API. Phirehose is a php library that is set up to do this: https://github.com/fennb/phirehose

How do facebook and my iOS communicate

I'd like to use iOS to post on my users's facebook walls/tickers/news feeds. I learned that opengraph can be very specific about the actions users take inside my app, and I'd like to integrate them into my project.
I think I realize now I am going to need my own server running for opengraph actions to work ,right? or is this not a must? from what I understand, the server supplies the basic data to facebook for the post, like image, main text, secondary text etc...
Is my server needed just to supply the facebook posts' data? Is my server called everytime a facebook page is loaded with my app's contents? Or is it done only once, and facebook is copying the posts' content into facebook's servers?
What happens if my servers is not responsive etc?
The short answer: yes, you probably need a server.
The longer answer:
The facebook documentation on Open Graph is much better than what I can fit here. If you have not already, check out this page and its links: https://developers.facebook.com/docs/opengraph/.
A published action on facebook is a tuple { user, action, object }. The types of actions and objects are defined in the facebook developer application (developers.facebook.com/apps).
The content of the post is generated by your iOS client. The post has data that references the action by name and the object by its URL.
The individual objects that your app defines are typically represented by pages on your web server. These pages are scraped by Facebook to extract metadata that defines the object, including images and text. I do not know of safe assumptions you can make about when the object's page will be scraped.
It is possible to create sample objects when you are editing your object types (developers.facebook.com/apps, create or edit one of your apps, "Edit Open Graph", "Add Sample Data"). However, because these are intended for experimentation, they are fairly limited in what you can do with them.

Resources