Archive

Archive for February, 2015

Free UK VPN (L2TP – suitable for iPad)

February 23, 2015 Leave a comment

vpn-td2.reliablehosting.com
Login:vpn527
Password:zGGZ8q8kE6
L2TP key:dARkaTt25rW4fqBC
Server:91.228.115.130

Not using this server for the rest of the month, so feel free to use it!

Advertisements
Categories: Uncategorized

Automated access_token grant using Facebook and C=

February 19, 2015 Leave a comment

Say you wanted to get an access token for facebook from a desktop app, but don’t want to display the normal facebook login screen. – and you somehow know the user’s facebook username and password  – then this approach might help you get the access token you need;

first, you need to set up a facebook app, and get the client_id

public void GetAccessToken(Action<string,string> Callback)
{
this.Callback = Callback;
string strUrl = “https://www.facebook.com/dialog/oauth?&#8221;;
strUrl += “type=user_agent&”;
strUrl += “client_id=xxxx&”;
strUrl += “redirect_uri=xxxxx”;
this.webBrowser1.DocumentCompleted += WebBrowser1OnDocumentCompleted;
this.webBrowser1.Navigate(strUrl);
}

Here, I’m assuming you have a windows form, with a web browser control called webBrowser1 – redirect_uri has to be whatever was configured in the facebook app, but other than that, it doesn’t matter.

then we fill out the username / password and click the login burron on Document completed;

private void WebBrowser1OnDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs webBrowserDocumentCompletedEventArgs)
{
if (webBrowser1.Url.Host == “<domain>”)
{
var variables = HttpUtility.ParseQueryString(webBrowser1.Url.Fragment);
var access_token = variables[“#access_token”];
var expires_in = variables[“expires_in”];
Callback(access_token, expires_in);
}
else
{
var strJs1 = @”document.getElementsByName(’email’)[0].value ='” + strUsername + “‘”;
var strJs2 = @”document.getElementsByName(‘pass’)[0].value = ‘” + strPassword + “‘”;
var strJs3 = @”document.getElementsByName(‘login’)[0].click()”;
SendJs(strJs1);
SendJs(strJs2);
SendJs(strJs3);
}
}

SendJS is defined as follows;

protected string SendJs(string jScript)
{
object[] args = { jScript };
var strReturn = webBrowser1.Document == null ? “” : webBrowser1.Document.InvokeScript(“eval”, args);
System.Diagnostics.Debug.WriteLine(jScript);
System.Diagnostics.Debug.WriteLine(strReturn);
return strReturn == null ? “” : strReturn.ToString();
}

You’ll also need the following global variables

public string strUsername = “<email>”;
public string strPassword = “<password>”;

public Action<string, string> Callback;

Hope this helps someone out!

Categories: Uncategorized

Changes to Linkedin API

February 12, 2015 1 comment
LinkedIn
Dear LinkedIn developer,
Today we announced some significant changes to our Developer Program that will likely affect your LinkedIn API access.In an effort to provide the most value to our members, developers and to LinkedIn, we’re restricting our open APIs and providing further clarity about the specific use cases we’ll support. Starting on May 12, 2015, the following uses will be supported:

  • Allowing members to represent their professional identity via their LinkedIn profile using our Profile API.
  • Enabling members to post certifications directly to their LinkedIn profile with our Add to Profile tools.
  • Enabling members to share professional content to their LinkedIn network from across the web leveraging our Share API.
  • Enabling companies to share professional content to LinkedIn with our Company API.

By May 12, all new and existing applications must focus on at least one of the use cases above and adhere to our updated API Terms of Use in order to access our open APIs. All other APIs will require developers to become a member of one of our partnership programs. For more information about these programs and to apply, go here.

The developer community continues to be a priority for LinkedIn. We want to continue providing tools needed to create great products around the use cases we support. So today, we’re releasing a new Mobile SDK for Androidthat allows developers to build applications that make it easy for members to log in with their LinkedIn credentials and deep link to view member profiles within the LinkedIn app.

Have questions? You can learn more about these changes on our blog post. A more technical breakdown of exactly what’s changing at the API level can be found in our transition guide and our updated API Terms of Use. We encourage you to review both documents to ensure your applications are supported and to ensure a smooth transition.

Thanks for being part of our developer community,
The LinkedIn Platform Team

Categories: Uncategorized

Using Html5 geolocation to find someone via their email

February 11, 2015 Leave a comment

Here’s a tool that you can use to track the location (lat/lon) of someone via their email account:

http://howto.findpeoplefree.co.uk

Categories: Uncategorized

Offline Adverts.com – an advertising solution that works even when offline.

February 8, 2015 Leave a comment

offlinead

Offline Adverts.com is an advertising platform for apps that is designed to work specifically when the user’s device is offline, and not connected to the Internet. This is where most ad platforms just show an empty space, this backup solution allows you to fill that unused ad space with a paid ad.

As an advertiser, it lets you gain brand exposure, even for a fraction of the cost of the mainstream ad networks.

Want to find out more? visit – OfflineAdverts.com

Categories: Uncategorized

Open Native Google Maps App from Phonegap / Cordova (iOS)

February 4, 2015 1 comment

If you want to show a map in your Phonegap app, you can always use the google maps API to show a map, or even use the in-app browser to link out to a google map page. But nothing quite matches the Google maps native app, with it’s funky satnav-like features, and slick interface

Thing is, the Google Maps App isn’t installed by default, so in this case, I’m failing-over to a in-App Browser version. This code is iOS only, but anyone wishing to provide a port to Android will be rewarded* (Yes, I’d pay for the port)

– (void) openGoogleMaps:(CDVInvokedUrlCommand *)command

{

NSLog(@”openGoogleMaps”);

NSString* callbackId = [command callbackId];

NSArray* arguments = [command arguments];

NSString* map = [arguments objectAtIndex:0];

CDVPluginResult* result;

NSURL *testURL = [NSURL URLWithString:@”comgooglemaps://”];

if ([[UIApplication sharedApplication] canOpenURL:testURL]) {

NSString *directionsRequest = [NSString stringWithFormat:@”%@%@”,

@”comgooglemaps://?” ,

map];

NSURL *directionsURL = [NSURL URLWithString:directionsRequest];

[[UIApplication sharedApplication] openURL:directionsURL];

result = [CDVPluginResult

resultWithStatus:CDVCommandStatus_OK

messageAsBool:true];

} else {

NSLog(@”Can’t use comgooglemaps:// on this device.”);

result = [CDVPluginResult

resultWithStatus:CDVCommandStatus_OK

messageAsBool:false];

}

[self success:result callbackId:callbackId];

}

Then, this is called from Javascript as follows:

function openGoogleMaps(route)

{

console.log(“openGoogleMaps”);

cordova.exec(function(data)

{

console.log(“Returned from google maps:” + data);

if (!data)

{

// Failed to find native app.

var strUrl = “http://maps.google.com/maps?&#8221;;

strUrl += route;

var ref = window.open(strUrl, “_blank”, “location=yes”);

}

}, function(data)

{

console.log(“Plugin failure”);

}, ‘StatusBar’, ‘openGoogleMaps’, [route]);

}

Categories: Uncategorized