public void Save(ISocialNetwork network) { var pandas = network.GetAllPandas(); WritePandas(pandas, "PandaNetwork.pandanet"); WriteConnections(pandas, "PandaNetworkConnections.pandanetconn"); }
//CREDENTIAL //Stage created for Fajardo //Stage created for Fajardo private void SetupStage1() { facebook = new Facebook(); IList <string> words = new List <String>() { "Fajardo", "Sergio Fajardo" }; configuration = new QueryConfiguration() { Keywords = words, Location = Locations.Colombia, Language = Languages.Spanish, Filter = Filters.None, SearchType = SearchTypes.Mixed, SinceDate = new DateTime(2018, 01, 01), UntilDate = DateTime.Now.AddDays(1), MaxPublicationCount = 100 }; IList <IPublication> found = facebook.Search(configuration); if (found.Count > 0) { publication = found[0]; } }
public void SetupStage3() { twitter = new Twitter(); IList <string> words = new List <String>() { "Petro", }; configuration = new QueryConfiguration() { Keywords = words, Location = Locations.Colombia, Language = Languages.Spanish, Filter = Filters.None, SearchType = SearchTypes.Mixed, SinceDate = new DateTime(2018, 01, 01), UntilDate = DateTime.Now.AddDays(1), MaxPublicationCount = 10 }; IList <IPublication> found = twitter.Search(configuration); if (found.Count > 0) { publication = found[0]; } }
//for project facebook's group public void SetupStage3() { facebook = new Facebook(); IList <string> words = new List <String>() { "Uribe", "Uribe Velez" }; //[ ]+Petro[ ,.]{} // configuration = new QueryConfiguration() { Keywords = words, Location = Locations.Colombia, Language = Languages.Spanish, Filter = Filters.None, SearchType = SearchTypes.Mixed, SinceDate = new DateTime(2018, 01, 01), UntilDate = DateTime.Now.AddDays(1), MaxPublicationCount = 200 }; IList <IPublication> found = facebook.Search(configuration); if (found.Count > 0) { publication = found[0]; } }
public void SetupStage3() { twitter = new Twitter(); string consumerKey = System.Configuration.ConfigurationManager.AppSettings["consumerKey"]; string consumerSecret = System.Configuration.ConfigurationManager.AppSettings["consumerSecret"];; string accessToken = System.Configuration.ConfigurationManager.AppSettings["accessToken"]; string secretToken = System.Configuration.ConfigurationManager.AppSettings["secretToken"]; Tweetinvi.Auth.SetUserCredentials(consumerKey, consumerSecret, accessToken, secretToken); IList <string> words = new List <String>() { "Petro", }; configuration = new QueryConfiguration() { Keywords = words, Location = Locations.Colombia, Language = Languages.Spanish, Filter = Filters.None, SearchType = SearchTypes.Mixed, SinceDate = new DateTime(2018, 01, 01), UntilDate = DateTime.Now.AddDays(1), MaxPublicationCount = 10 }; IList <IPublication> found = twitter.Search(configuration); if (found.Count > 0) { publication = found[0]; } }
// Test facebook page RealidadPoliticaColombiana private void SetupStage4() { facebook = new Facebook(); IList <string> words = new List <String>() { "gallup", }; configuration = new QueryConfiguration() { Keywords = words, Location = Locations.USA, Language = Languages.English, Filter = Filters.None, SearchType = SearchTypes.Mixed, SinceDate = new DateTime(2018, 03, 18), UntilDate = DateTime.Now.AddDays(1), MaxPublicationCount = 40 }; IList <IPublication> found = facebook.Search(configuration); if (found.Count > 0) { publication = found[0]; } }
private void ConnectNewWork(ListViewItem lvi) { ISocialNetwork netWork = (ISocialNetwork)lvi.Tag; CountConnectedNetWorks += netWork.Autorization() ? 1 : 0; lvi.SubItems[1].Text = netWork.IsAuthorized.ToString(); lvi.ForeColor = netWork.IsAuthorized ? Color.Green : Color.Red; }
public SocialNetworkProvider(Dht dht, SocialUser user) { _local_user = user; _dht = dht; _provider = _drupal; _network = _drupal; _drupal = new DrupalNetwork(user); _online = false; }
private static void LoadPandas(ISocialNetwork network, string filename) { var serializer = new JavaScriptSerializer(); var jsonString = File.ReadAllText(filename); var deserializedResult = serializer.Deserialize<IEnumerable<PandaDTO>>(jsonString).Select(PandaDTO.ConvertToPanda); foreach(var panda in deserializedResult) { network.AddPanda(panda); } }
public MainPageViewModel() { _fbSocialNetwork = ViewModelLocator.GetContainer().Resolve <ISocialNetwork>(); LoginCommand = new RelayCommand(Login); LogoutCommand = new RelayCommand(Logout); GetFriendsCommand = new RelayCommand(GetFriends); GetMusicCommand = new RelayCommand(GetMusic); }
public MainPageViewModel() { _VkSocialNetwork = ViewModelLocator.GetContainer().Resolve <ISocialNetwork>(); LoginCommand = new RelayCommand(Login); LogoutCommand = new RelayCommand(Logout); GetFriendsCommand = new RelayCommand(GetFriends); GetFriendsRankCommand = new RelayCommand(GetFriendsRank); GetPopularMusicCommand = new RelayCommand(GetPopularMusic); GetReccomendedMusicCommand = new RelayCommand(GetReccomendedMusic); }
/** * Constructor. * @param node the social node. * @param provider the identity provider. * @param network the social network. * @param port the port number for the HTTP interface. * @param srh the social rpc handler. */ public SocialConnectionManager(SocialNode node, IProvider provider, ISocialNetwork network, string port, Dictionary <string, SocialUser> friends, SocialRpcHandler srh) { _snode = node; _provider = provider; _network = network; _friendlist = new List <string>(); _friends = friends; _http = new HttpInterface(port); _http.ProcessEvent += ProcessHandler; _http.Start(); _srh = srh; _srh.SyncEvent += SyncHandler; _timer_thread = new Timer(new TimerCallback(TimerHandler), null, STARTTIME, INTERVALTIME); }
public SpamApplication(SocialNetworkBrand type) { switch (type) { case SocialNetworkBrand.Facebook: _network = new Facebook(); break; case SocialNetworkBrand.LinkedIn: break; case SocialNetworkBrand.Twitter: break; default: break; } _spammer = new Spammer(); }
/** * Constructor. * @param node the social node. * @param provider the identity provider. * @param network the social network. * @param port the port number for the HTTP interface. * @param srh the social rpc handler. */ public SocialConnectionManager(SocialNode node, IProvider provider, ISocialNetwork network, string port, Dictionary<string, SocialUser> friends, SocialRpcHandler srh) { _snode = node; _provider = provider; _network = network; _friendlist = new List<string>(); _friends = friends; _http = new HttpInterface(port); _http.ProcessEvent += ProcessHandler; _http.Start(); _srh = srh; _srh.SyncEvent += SyncHandler; _timer_thread = new Timer(new TimerCallback(TimerHandler), null, STARTTIME, INTERVALTIME); }
void Awake() { facebook = new FacebookHandler(); }
public Application() { _socialNetwork = new Facebook(); }
public void Register(string name, ISocialNetwork network) { _networks = _networks.InsertIntoNew(name, network); }
public Application(ISocialNetwork network, SocialSpammer spammer) { _network = network; _spammer = spammer; }
public VariantAssetConfig AddSocialNetwork(ISocialNetwork socialNetwork) { _socialNetworks.Add(socialNetwork); return(this); }