peter2322
Forum Replies Created
-
No problem, wordpress doesnt really give a good way to notify the user when updating the plugin about changes :(.
I was able to recreate that error when the client secret on the plugin settings page didnt match the one in the Google API console. Please double check your client secret and let me know if that’s the problem
Thanks for pointing that out to me, in the next version I will handle that error better.
Hi Leigh,
Thanks for trying the plugin and letting me know about a problem. I hope we can get this working for you because your website is a great use for this plugin.
Just to double check, you updated the Google API console with the redirect uri listed in the Google Latitude History plugin settings page as shown in screenshot-6?
What is the Redirect URI listed in Google Latitude plugin and the url listed on the Google error page?
hello,
I have updated the plugin (0.9.5) to handle multiple maps on 1 page and fixed the openwindow shortcode option.
You can change the style including the font using the custom css plugin setting. If it doesnt work as it should let me know. In the next release i am adding an individual style shortcode option that overrides the plugin settings one.
I checked about the infowindows. Unfortunately the max width you can set the infowindow is to 200px which ends up being 247px with all the padding. So it doesnt appear that infowindows are very attractive on a small map. would an option to turnoff the infowindows help? users will still be able to mouse over a point to see it location.
I dont know why you are not getting the tokens. Are you doing this on external web service? Have you tried getting up wordpress on your local computer?
Also the Oauth playground probably didnt work on the last step b/c the I believe Google Latitude team is currently working on the service. I am getting different results everyday from the playground.
hi roel,
I checked about the info window and you caught a bug. Try using openinfo=”false”. The documentation didnt match the code. When I release the next version of this code I will fix it. thanks.
also I think i have the proper solution for using the plugin in the widget area. Hopefully I ll have it this week.
To use the short code in the widget sidebar, you must add add_filter(‘widget_text’, ‘do_shortcode’); to your theme’s function.php. You can use the plain “text” widget to add the shortcode. One problem that will occur with my plugin right now if the post and the sidebar have a google latitude map b/c the div ids will be the same causing only 1 map to render and the javascript variables have the same names. I need to think about how to implement this properly.
Forum: Plugins
In reply to: [Twitpic Profile Widget] [Plugin: Twitpic Profile Widget] Say GoodbyeAll my plugin does is add the url query parameters to render the official Twitpic Profile Widget from Twitpic. If you are saying that clicking on an image in the wordpress twitpic profile widget takes you to a porn site instead of the Twitpic image page, then that is a problem with Twitpic. My twitpic profile widget is fine using my handle. what is the twitter handle of the twitpic profile widget generating porn links?
Forum: Plugins
In reply to: [Twitpic Profile Widget] [Plugin: Twitpic Profile Widget] Say GoodbyeI am the author of the plugin. What are you talking about? There is no outgoing link to porn in this plugin. Please get your facts straight before slandering my plugin.
Forum: Plugins
In reply to: [Google Latitude History] [Plugin: Google Latitude History] Map not working?Hi Roel,
My bug was finally acknowledged by Google.
https://code.google.com/p/latitude-api/issues/detail?id=30
I updated the plugin last night, so update your plugin and try syncing with the granularity set to best.
Forum: Plugins
In reply to: [Google Latitude History] [Plugin: Google Latitude History] Map not working?I have verified that its not my plugin by using Google’s OAuth 1.0 and 2.0 playgrounds which queries the Latitude API. I am getting the same result in both playgrounds – empty location data. ??
ok try this:
Go to Google OAuth Playground at https://googlecodesamples.com/oauth_playground/index.php
1. scope url = https://www.googleapis.com/auth/latitude
2. oauth_signature_method = HMAC_SHA1
2. oauth_consumer_key = your key
2. consumer secret = your secret
3. request token and grant access
4. authorize request token
5. access token
6. enter https://www.googleapis.com/latitude/v1/currentLocation and executeThis will test your request for a oauth token without my application.
You are having a different problem then me.
When you are getting the OAuth token its not being saved. Without this token you will be unable to make requests to the Google Latitude API for your location data. It appears that you have gone through the steps of requesting a token correctly.
Try this to see if you are getting and saving the token.
1. In google-latitude-history.php, replace this function:
function GoogleLatitudeHistory() { //Inserts Latitude OAuth info into the DB if(isset($_REQUEST['oauth_token']) && isset($_REQUEST['oauth_verifier'])) { //Create LatitudeOAuth object with app key/secret and token key/secret from default phase $connection = new LatitudeOAuth(get_option('glatitudehistory_oauth_consumer_key'), get_option('glatitudehistory_oauth_consumer_secre\ t'), $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']); //Request access tokens from google latitude $access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']); update_option( 'glatitudehistory_oauth_token', $access_token['oauth_token']); update_option( 'glatitudehistory_oauth_secret', $access_token['oauth_token_secret']); header('Location: ' . $_SERVER['SCRIPT_NAME'] . '?page=google-latitude-history-menu'); } //Creates Latitude connection $this->latitude_con = new LatitudeOAuth(get_option('glatitudehistory_oauth_consumer_key'), get_option('glatitudehistory_oauth_consumer_secre\ t'), get_option('glatitudehistory_oauth_token'), get_option('glatitudehistory_oauth_secret')); }
with
function GoogleLatitudeHistory() { //Inserts Latitude OAuth info into the DB if(isset($_REQUEST['oauth_token']) && isset($_REQUEST['oauth_verifier'])) { //Create LatitudeOAuth object with app key/secret and token key/secret from default phase $connection = new LatitudeOAuth(get_option('glatitudehistory_oauth_consumer_key'), get_option('glatitudehistory_oauth_consumer_secre\ t'), $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']); //Request access tokens from google latitude $access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']); var_dump($access_token['oauth_token']); update_option( 'glatitudehistory_oauth_token', $access_token['oauth_token']); update_option( 'glatitudehistory_oauth_secret', $access_token['oauth_token_secret']); header('Location: ' . $_SERVER['SCRIPT_NAME'] . '?page=google-latitude-history-menu'); } //Creates Latitude connection $this->latitude_con = new LatitudeOAuth(get_option('glatitudehistory_oauth_consumer_key'), get_option('glatitudehistory_oauth_consumer_secre\ t'), get_option('glatitudehistory_oauth_token'), get_option('glatitudehistory_oauth_secret')); }
2. click “Refresh OAuth Token” on the Google Latitude settings page and go through the 2 screens to grant access. When you are returned to wordpress at the top should be something like:
string(45) “2/8w-1s2swPQshajsdke9ck333Zb2cQy1nfkEL8”
If you see this, this is the oauth token. you can change the function back now.3. If you see the oauth token there query your wordpress database in query the options table where option_name = ‘glatitudehistory_oauth_token’. You should see the token there too.
This update includes allowing the user to see the location data from Google Latitude that is being used to populate the maps (which was the code snippet I was asking you to insert). Several users including myself are receiving empty location data from Google Latitude. I don’t know if this is a widespread issue among Latitude users or widespread among people using my plugin. This update will help you check if it’s the same problem. My suspicion is that since my application was working and didn’t change and Google Latitude is in beta development that something changed on the Google side.
your url looks good. I am not sure where that fatal error is coming from. I have updated the plugin to include displaying the Google Latitude rest service response after you sync the locations. Please download the new 0.9.3 version and after syncing the locations click “see Latitude response” and paste the json data here.
That is a php error. The function should look like this after the line is pasted in. I think you deleted the return statement.
function oAuthRequest($url, $method, $parameters) { if (strrpos($url, 'https://') !== 0 && strrpos($url, 'https://') !== 0) { $url = "{$this->host}{$url}"; } $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); $request->sign_request($this->sha1_method, $this->consumer, $this->token); switch ($method) { case 'GET': echo $request->to_url()."<br/>"; return $this->http($request->to_url(), 'GET'); default: return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata()); } }