Error posting content on Facebook using gem (koala) on ROR - ruby-on-rails

In my ruby on rails application i am using Koala gem to post contents like message/link on facebook. But while trying to post its giving following error message:
You've already posted this. Posting the same content repeatedly on
Facebook isn't allowed
I am however posting different content each time.
My code:
auth_token="token" # this token i am getting from facebook graph-api with publish_actions permission.
#graph = Koala::Facebook::API.new(auth_token)
message=#graph.put_connections("me", "feed",:message=> "welcome")
Could you tell me that what would be the exact problem? and how to resolve it?

I just had this problem too, its not an issue with koala its a facebook problem. I was trying to post stuff on my own wall using the facebook graph explorer, I accidentally posted the same message several times. As a result facebook flagged it as spam and as a result blocked all messages from applications from being posted onto my feed.
I had to click on the notification which mentioned 'please check your recent posts and likes to make sure their yours', press some buttons saying that everything was fine, and after that I was able to use the facebook graph api to send posts to my page.
So this problem is caused by posting multiple identical messages to a users account, causing facebook to categorise your app as spammy, from that point onwards even if the messages are different you'll get the same error message.

Related

"Invalid Dynamic Link" error page after user uses login link

I am using Firebase email login link to authenticate the users of my iOS app, but for some users the system doesn't work and are presented with the following page after they tap on the link sent by Firebase via email:
This happens sporadically and for a handful of users only, so I haven't been able to reproduce it. Most of my users are able to use the email login link system ok. Having talked to users who have this issue, they don't seem to be doing anything differently from the ones for whom the system works.
Has someone else encountered it and if so how can I solve it?

How to allow access to logged in users email message while using Google plus sdk in ios?

I have got Google signin integration for my application. I successfully integrated it and by default i am getting username, usermailid, , user id and user authorization token id from sdk. Next thing i want is how to retrieve messages of Logged in user inbox. I went through the following links
https://developers.google.com/+/web/api/rest/oauth#authorization-scopes
https://developers.google.com/identity/protocols/googlescopes#replicapoolupdaterv1beta1
But still i am getting problems and confused in getting mail messages.
I think this is what you need
https://www.googleapis.com/gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}
And I strongly recommend you to use Google Playground to pick the exact API you are looking for

"#sessions" does not exist

I am using https://github.com/arunagw/omniauth-twitter
Apparently this issue only happens on the iPhone and iPad.
Here's how to replicate the issue. I tweeted on Twitter. The tweet contains a link that points to by web app: https://www.foobar.com/1 (ps This is a dummy link. You can use your own link).
Make sure the controller/method handling the link (https://www.foobar.com/1) has the following line redirect_to "/auth/twitter?use_authorize=true"
On the iPhone or iPad, open up the Twitter App. Search for the tweet. Tap on the link (https://www.foobar.com/1).
The page should redirect you back to /auth/twitter?use_authorize=true. Everything works fine so far. The user is sent to Twitter's login portal/form. However, after the user fills out the form and submits it. Instead, of being redirected back to our web app, he is sent to Twitter where it says:
"#sessions" does not exist
Anyone else experience this before? At this point, I don't know if this is a Twitter API issue or the way I am supposed to redirect with the gem.
The issue also seems apparent with other people:
https://twitter.com/Starbucks/status/482656278410723328
https://twitter.com/CocaCola/status/483420891393826816
https://twitter.com/RayaVlogs/status/492528237629943808
https://twitter.com/MattNavarraUK/status/494915033634447360
https://twitter.com/WillHillBet/status/497021431021330433
Update: Searching #sessions on Twitter, returns several people experiencing the same issue. It may be related to Twitter's API, more than anything. Apparently, its also happening with their widgets. Anyone think of a workaround?

I get confirmation of my posted open graph action, but don't see any posts

I am using the new Facebook IOS SDK 3.0 and have integrated the Scrumptious sample into my app. I have specified the namespace and action for my app correctly. When I click "announce", I get "posted open graph action, id: xxxxx" so it looks like my post is successful. I am assuming the post will go to my personal Facebook news stream since that I who I am logged in as, however I don't see anything. Is there anything that needs to be done with my app to make it active? Or other settings that I might be overlooking? Thanks.
It turns out I didn't enable timeline on my facebook account so I didn't see the posts. Once I enabled it, I was able to see them. I could also see them in my activity log. I have another issue with tags now, but at least I am able to post now. Thanks.

In rails, how can I import a user's facebook contacts when they sign up?

I have a signup form, and I wanted to make it so that they have the option of recommending this signup to all their friends in facebook.
Is there a rails API/gem for doing this?
Is there an appropriate name for this?
Thanks!
Looking at the Extended permissions documentation, you don't get access to the email addresses of a Facebook user's friends (search for email and note the second column reads not available). If that's what you're trying to achieve, it's almost certainly not possible, without the user contacting each friend and asking them to visit your app (which I would imagine would have quite a low take-up, if only through inertia).
I guess you have two options:
popup a javascript before submitting the form to prompt the user wether he wants to share it with friends. You will use the js api http://github.com/facebook/connect-js (see the dialog section). This solution would avoid doing server side connection to the facebook api
Have a look a the Facebooker gem to do a stream_publish

Resources