JS Like-Gate not working for all testers - javascript

I have some like gate js code that is checking if a user is logged in, and likes a particular page. If they like the page they view one html, if they don't they get another html page. It works for me, however I have two other testers who it doesn't work for. However when I log into my facebook account on their computers the like gate works. Can you tell me if facebook caches pages for individual accounts? Or direct me to the proper answers as to why this is happening? Please not my company is ROR shop so we cannot use any other server-side language like php for a solution. Thank you in advance.

Maybe, the administrator user get's through the gate but not other users they get stuck in the not like section.

Related

Why can't I get another users OAuth data into my Google Sheet with Google Apps Script

All I want to do (for now) is have the end user authorize, via Oauth, permission to view email address, and have the script put that email address into my spreadsheet.
In testing, this works great. Buttons are clicked, tokens are exchanged, magic is made, all as expected when using my account, but when I publish and test with another account I get:
The state token is invalid or has expired. Please try again.
When I change...
"Execute the app as: Me"
to...
"Execute the app as: User accessing the web app"
...the second test account works, but I get no results on my end (obviously).
This makes me think that I've hit some limitation with the data exchanging across accounts, but this just doesn't seem right. This seems like a pretty normal thing to attempt. Maybe I'm wrong.
I'm happy to edit this question and share any code needed, but I'm pretty much using code straight off of googlesamples/apps-script-oauth2
I guess I'm mostly asking if I can do what I'm trying to.
Here's the web-app.
Please help

Is it possible to auto subscribe in sites through a Form?

I have built a site and have several social networks to promote it, and sometimes I have giveways to people which I normally have through facebook. The giveaways normally require that the person subscribe to something (as a counterpart of receiving the giveaway or participating on trying to win it), but facebook and other sites just are bad for these kind of things, specially proving that you subscribed to anything.
So here's my thought:
Use a fillout template (like a HTML FORM)
person login with a FACEBOOK Account
Based on that Facebook account, person subscribes to
newsletter, likes a page, whatever, but everything done through that
FORM-like thing, logged in, one step to participate.
In your experience, is this even possible? with what? CSS, HTML, JSQUERY...
This time I'm opened to anything you can guide me, I'm tired of trying to work
giveways through social networking site's GUIs is just annoying...
Thanks for all the help you can provide.
Alban
Sounds like you want Oauth and OpenId. It's not particularly easy to set up, but it's very effective. If you sign into stackoverflow using google you're probably using it.
According to wikipedia facebook no longer support it, using facebook connect instead, but almost everything else does.

how to use Facebook share button in my web page to share or post something to facebook page?

i am added a facebook share button to my website it is sharing or posting things to profile timelines but it is not sharing or posting anything to my page(like fans page in facebook).Is there anyway to choose to post to your fan page? any one can help me? plz..
Considering whatever is the "things" in your website, say a product with id 123, for example.
You can make users like it/share it using the standard fb-like button.
When they do like it and/or share it, it comes up as a thing they liked on your website. If that object of yours, has a proper URL with proper meta-tags, it will show up nicely on FB as a story. Good guide here
You can also use the facebook debug tool for testing if the sharing, meta tags are all working as expected here.
If you want your page to be the object of sharing, the only thing that can be done is users can like your page from your website. You cannot share stories from the API to the page, as the page is not an entity. Meaning its not a user.
So, if the page said,
User XYZ liked item ABC on yourwebsite.com
it won't make much sense to the people who see this.
Instead if userXYZ liked an itemABC on your site, the following update on FB will make much more sense.
UserXYZ liked itemABC on yourwebsite.com
(This will have a proper pictorial representation and a clickable link to your website if the like button and the destination url are configured correctly)

How can I detect a successful login in my firefox extension?

I am trying to create a firefox extension to detect if someone successfully logs into a site, but am having a little difficulty determining an algorithm to do this.
My thoughts right now are to use javascript to accomplish this and to firstly check to make sure the user is on a page with a login, for all intensive purposes a password field. Then after a login attempt has occurred, I would check to see if it is successful by looking to see if a password field is still on the page.
Another idea would be to compare the url before and after the login and see if they are different, yet within the same domain. This however, has drawbacks for sites like facebook, for which the login and the landing page are the same.
Does anyone have any other ideas on how I might make this detection?
Thanks in advance!
You pretty much can't make a generalized detection algorithm that would work on each page. As you yourself mentioned, different pages have different schemes.
Even in the scheme where the login and landing page are different, how would you know whether the post-login page displays an error or notifies somebody of a successful login?
The first method you mention actually has some merit and might really work for most of the sites, but again there is a good chance you will run into problems when we talk about logging in using FB authentication or Google Accounts authentication, as there are multiple redirects, and also a password input may never appear (in case I am already logged in to Google Accounts, then jut choosing Google as my ID provider logs me in to StackOverflow).
If you could consider the above mentioned case and come up with a workaround (checking redirects for specific providers.. there are not many of them, so you could cover most of the cases), then yes, your first solution combined with this could provide a workable method.

Check if user Likes Page with JS API?

I know this has been asked a bunch of times, but I have only seen serverside solutions.
I'm running an iframe app that is embedded into a page as a tab. I want be test to see if the page is liked or not without prompting the user for anything.
Is there a way to do this with just JavaScript? The platoform we are building on is ASPX and I dont really have the option of going serverside.
Its not available because you need to inspect the http post parameter called signed_request and this isn't available on the client side. If the user has authenticated with your app and given you permissions to read their likes/interests, then you could then check with javascript api but I'm guessing you wouldn't want to make them approve your app just for this.

Categories

Resources