Anyone that had the aol oauth api working? - php

i'm developing an application with multiple login and information export options like yahoo, google contacts, live contacts etc. I tried to do the oauth wrapper for aol, followed the examples in the http://dev.aol.com/api/openauth page but it doesnt works.
I just only wanted to know if there is anyone that chad succeeded with its specs and got some sample code working, i tried and got the token in response but when i try to do an api request i get the response : Key Used From unauthenticated site
does it have to run in a online server? do i have to get some rsa signed file on my server?
any hint is welcome, thank you very much!

I haven't tried it before but I think you have to tell them your the IP you will sent requests from..
I was making project over enom API and I had to send them my IP to authorize my API requests

sorry for my late response, have being little busy here. The code in the example finally worked right last time i tried, maybe their servers had some issues or i misconfigured the example, not sure, but in my project it didnt worked, finally i managed the solution by using the CURLOPT_REFERER parameter i found in the example. I am sure that it was the issue in my code, because i was testing in a devel environment with a .loc top level domain.
Finally i want to give a hint to all the people trying to develop 3rd party apps that check the validity of the urls asking for permissions, you could use a testing environment by using the CURLOPT_REFERER paramater by setting the production url you want in the testing environment.
file in the testing environment http://www.mycoolsite.loc.
curl_setopt( CURLOPT_REFERER 'http://www.mycoolsite.com' );
The site that will receive the answer will check the referer and assume the .com one instead the .loc
Thanks to everybody that tried to help me.

Related

How do I add a webhook to my local magento website in mailchimp without exposing the URL publicly (for SEO reasons)?

I am using the magemonkey extension from Ebizmart and when i save my config in the admin i get the following error:
Could not add Webhook "http://example.com/monkey/webhook/index/wkey//" for list "Test Mailing List", error code 508, We couldn't connect to the specified the URL. Please double check and try again.
I did some digging and arrived at the conclusion (duh) that mailchimp cannot see my local environment so it's unable to add the webhook. Is it possible for me to configure this locally for testing purposes or do I have to wait until the site is live (sounds pretty strange to me)?
UPDATE: I reached out to Mailchimp and got the following response. Seems like they won't add a host entry to recognize my test environment. The only way to accomplish this would be to use a handshake key.
Thanks for reaching out to MailChimp support. I can certainly understand the concern here and will be happy to help.
Unfortunately, any webhooks being used must be publically available and there would not be a way to add a host entry in MailChimp so that the URL can be used.
If your testing environement allows for HandShake keys, one options might be to add that on to the url: (can't add more than 2 links)
At MailChimp we definitely appreciate testing and encourage it with our users and I will be sure to pass this feedback along to our developers so that testing in closed environments might be a bit easier. I also wanted to provide a link to our feedback form in case you wanted to leave some feedback for our developers directly: (can't add more than 2 links)
If you have any additional questions or concerns, feel free to reach back out and we will be happy to help.
Thank you,
Mikey
Use https://ngrok.com/, available for all platforms.
It allows you to tunnel requests to your local dev machine. It's very easy to use, just download and run:
ngrok http 80
Then it'll show you the forwarding URL (where xxx is randomly generated):
Forwarding https://xxxxxxxx.ngrok.io -> localhost:80
Use https://xxxxxxxx.ngrok.io as the begining of your webhook callback URL.
Once it's running, a web interface is available at http://127.0.0.1:4040 that shows metrics and let's you replay requests.

Integrating youtube API in php on localhost

I'm developing a PHP app on my local computer and trying to use the public data API. The key has been generated and works well online, but as soon as I try to execute it on my localhost it returns
Access Not Configured. Please use Google Developers Console to activate the API for your project.
I have added these lines to the 'allowed referers' section in the developers console.
http://127.0.0.1
127.0.0.1
http://localhost/
localhost
http://myIpAddress
myIpAddress
None of them seem to help. This is the query sending via GET:
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=######&fields=items%2Fsnippet&key=#######
My issue had nothing to do with the cases described here, but might help others.
I had a scenario where the API worked well online but not on localhost (WAMP), after migrating from old API.
The fix had to do with cURL, and I really can not explain why it did work online, I am not an expert, it's something related with SSL.
Basically, you need to turn of SSL verification, by using
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
According to your answer #neki-doar-fraer, i make the explanation more clear for other viewers of this post :
From the doc of YouTube API
Use a server key if your application runs on a server. Do not use this
key outside of your server code. For example, do not embed it in a web
page. To prevent quota theft, restrict your key so that requests are
only allowed from your servers' source IP addresses.
Use a browser key if your application runs on a client, such as a web
browser. To prevent your key from being used on unauthorized sites,
only allow referrals from domains you administer.
From the Google Developer Console, assuming you have already created a project, select the project you are working on.
Then from the side menu on the left select "APIs & Auth", then "APIs". From that screen you have to search for the YouTube API and then click the "On" button next to it.
I figured it out. I was using the browser key. Did not know there is a difference. Generated the server key and everything works.
I have always edited my HOSTS file to point the domain to LOCALHOST when testing things locally https://en.wikipedia.org/wiki/Hosts_(file)

Facebook graph api doesn't response on real host but work fine in localhost

I had been using my written script for months and just from few days ago facebook stop responding ( it take forever to loads ) when the request is made from my host, but the same exact codes work fine when run in localhost.
I had been using curl method to get the group feed https://developers.facebook.com/docs/graph-api/reference/v2.0/group/members
file_get_contents("https://graph.facebook.com/489360131076423/feed/?access_token=APPID|SECRETCODE")
which still work fine in localhost but not in server. Then i also tried using "PHP SDK" method still having the same problem.
My setting in facebook developer is too seems to correct (it was working before too) as I have two domain allowed in App Domains setting which are "localhost" and "xxxxxxxx.im" ( my domain is .im not .com and obviously in xxxx i have my domain name written)
The question is
1. Can anyone suggest what could be the problem ?
2. Any suggestion for debugging this? because i don't get response at all. So no idea about any request error :(
Thanks :)
Try using ob_start(); function in the starting of page

App on Facebook

I'm trying to run the example.php file that comes with the facebook sdk. I do have a hosting server that runs php, and also changed the ID's to the corresponding one on my app. Here is the message i'm getting:
This webpage is not available
The webpage at https://filipeximenes.com/facebook/ might be temporarily down or it may have moved permanently to a new web address.
Error 501 (net::ERR_INSECURE_RESPONSE): Unknown error.
i'm pointing the canvas to this adress: http://filipeximenes.com/facebook/
Thanks.
Based on your description, I think that this is your problem:
Do you have a valid security certificate on the hosting server? I ran into that problem recently when deploying an FB app. Since October, you have to have a valid cert even in sandbox mode for the FB app to run properly. If you don't have one it causes weird problems.
Just a thought that I hope helps.
One other thing to do from a debugging perspective is to take a look at the actual app running on your hosting server without viewing it via FB. If you get the same error message there, you know that it has nothing to do with the FB SDK.
Thanks!
Matt

Windows live contacts PHP for 2011

I'm currently developing an invite system that is to be integrated into other systems. This development is web based with PHP5. Now i've been looking and testing code for about two weeks but all examples are out-dated and do not work with the windows live 2011. The windows live website itself isn't much of a help.
The login and contacts access requests have to be done trough popup because in my case its not acceptable to let people leave the website to login etc.
So am I just lazy or what is this about?
No, actually I'm not lazy, I did google, I did test etc etc. Just to let you see what I've tried upto sofar:
Out-dated http://livecontactsphp.codeplex.com/
Followed all tutorials at http://msdn.microsoft.com/en-us/library/gg276466.aspx no luck.
Out-dated http://www.phphulp.nl/php/forum/topic/windows-live-contacts-api/47598/
Out-dated http://social.msdn.microsoft.com/Forums/en-US/wliddev/thread/0087c7f6-d6b7-498e-8c6c-dd95cd2165f8
This list continues for a while.
Anyway, I got a verified domain an full access etc.
Is their anyone with suggestions and/or examples?
Your help is really appreciated
As per my understanding , what you are trying to do in your web app is to allow the end user to login to his windows live account and after logging in your web app will access his account data .
You need to use Oauth . The tutorial provided here http://msdn.microsoft.com/en-us/library/gg276466.aspx , is working for me in local host .
But I am not able to access contacts

Categories