GEORGE TRIFONOV Home Developer Corner Contact Resume 
Theme
Login
 
 
Get suggested twitter friends based on your current friends

As a new twitter user I always wondered, how people make decision whom to follow and what factors are playing important role in such decision process.
Mainly we adding our friends which we personally know, news sites, industry experts and sites on which we prefer to spend our time. Some times when we talking about networks and communities it is hard to identify all people which we want to follow. As your friend might recommend you somebody in real life, your friend twitter list can also tell a lot.  Twitter App with code name ‘SocialMole’ analyse you friends networks and suggested twitter  profiles to follow, which are shared across multiple of your friends.  

Today I uploaded beta version of ‘SocialMole’ to  www.findtwittertofollow.com. It took me some time mainly to choose api library  and solve hosting problems to make this application up and running. I am waiting feedback, so please share with your friends. 

Enjoy and let me know what features you  would like to see there..

Share this post: email it! | bookmark it! | digg it! | kick it! | live it!
Posted: Tue, 26 Jan 2010 0:45:28 GMT By: gtrifonov
Godaddy-System.Security.SecurityException: You cannot use in partial trust without a policy that allows connecting to API endpoints.

I am using hosting from GoDaddy.com and yesterday got exception playing with Twitter API library - TweetSharp .

System.Security.SecurityException: You cannot use TweetSharp in partial trust without a policy that allows connecting to API endpoints.

 

Exception Details: System.Security.SecurityException: You cannot use TweetSharp in partial trust without a policy that allows connecting to API endpoints.
The following policy information (or equivalent) must be added to your trust policy:
<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1">
<ConnectAccess>
<URI uri="http://twitter\.com/.*"/>
<URI uri="http://api.twitter\.com/.*"/>
<URI uri="http://search.twitter\.com/.*"/>
</ConnectAccess>
</IPermission>

After searching I found that GoDaddy will not allow me to modify their policy, since it is shared hosting account. Resolution is to apply WebPermissions in your code:

 

var permissions = new WebPermission();
            var baseUrl = @"http://twitter\.com/*";
            var apiUrl = @"http://api.twitter\.com/*";
            var searchUrl = @"http://search.twitter\.com/*";

            permissions.AddPermission(NetworkAccess.Connect, baseUrl);
            permissions.AddPermission(NetworkAccess.Connect, apiUrl);
            permissions.AddPermission(NetworkAccess.Connect, searchUrl);

            try
            {
                permissions.Demand();
            }

Please note that in case of GoDaddy, you don’t need to use regexp as urls. 

Share this post: email it! | bookmark it! | digg it! | kick it! | live it!
Posted: Tue, 26 Jan 2010 0:13:24 GMT By: gtrifonov