Targeting cities or regions in Lebanon with Facebook ads

Until recently, it was impossible to target organically regions or areas in Lebanon with Facebook ads. This feature is now available. In the screenshots below, I describe the new option and the one I was using and that I still use for political marketing (voters and users can use the Internet from work or home, and vote or live in a different area).

 

The new method

In the location are of your ad creator, you are now able to select cities or regions with a radius (how many miles around the city in all direction). In the example below, I chose “no radius” to limit the targeting to Achrafieh only without its surrounding areas:

1

 

My own method

This is the method I was using before this option has been made available. It is very similar to a previous post about targeting the competition. The Idea is to find very specific pages about a region and target the fans of these pages using the “interests” option in the ad creator page. In the example below, I targeted the fans of “Achrafieh 2020” and “Achrafieh”:

2

 

This article was mentioned by Catherine Stevens in http://paper.li/cas314159?edition_id=c2714300-ff1b-11e4-871e-0cc47a0d15fd

Facebooktwitter Facebooktwitter

Simple Walkthrough to Visualizing Twitter Data on NodeXL

In this post, we will consider analyzing the Arabic hashtag 1 with NodeXL. If you’re searching for a Latin string or hashtag, go directly to step 3.

1- On some computers, searching for an non-Latin string may cause NodeXL to return a null result. The safest option is to convert the Arabic string to URL code. Several websites offer a conversion tool. Look for “URL encode decode” on Google. We will use the following website: http://meyerweb.com/eric/tools/dencoder/.

2- type the hashtag in the text box and press “encode” then copy the resulting code:1 2

3- Open NodeXL and select “import from Twitter search network”:

3

4- Paste the code from step 2 in the search box. You may want to limit the number of tweets (in this example, we limited the number of tweets to 1,000). Note that you may need authorize NodeXL to use your twitter account if this is your first Twitter analysis.

4

5- The worksheet is automatically filled after the search. In the vertices sheet, you can check the names of the tweeters and some useful information about their popularity (followers) that can be combined with other data in your analysis:

1

6- Choose the “Harel-Koren” algorithm and “show graph”:

2

In its current state, the graph doesn’t say much. Yet, it can give you an idea of the structure of the network and you can mouse-over the vertices to read the tweets and the mentions. We will improve the layout in the next steps.

7- In the NodeXL ribbon tab, click on “Graph Metrics”. Then, “Select All” and “Calculate Metrics”.

1

8- The data compiled can be used to analyze the network and its characteristics (outside the scope of this article which is limited to retrieval and display). Note, that in the vertices sheet, the “in degree” represents the number of times the tweeter was mentioned and the “out degree” the number of times he mentioned someone else. 2

9- In this step, we will group the vertices into clusters. In the NodeXL tab on the ribbon, click on “groups”, “group by clusters” and put neighbourless in one group to avoid having all your singletons displayed as a stand alone group:

1

Note the Groups and Group Vertices worksheets.

10- In the layout algorithm dropdown, select “layout options” and “layout groups…”

2

1

11- The resulting graph show small independent clusters with no interaction between each other. Note the singletons in the first group (people who were never mentioned). Check the following article for details about twitter network structures: http://www.smrfoundation.org/2014/03/02/6-kinds-of-twitter-social-media-network-structures/

2

12- To display images instead of dots, in the vertices sheet, select “image” in the shape column, go to the NodeXL tab in the ribbon, select group, group options and check “the shapes specified in the shape column….” to use the shapes defined in vertices sheet instead of those defined in the Group Vertices sheet (this also works for colors).

1

Note the size and opacity options you can also use to improve the layout.

13- The Autofill option allows you to quickly fill a column to modify the layout of your graph (note that you need to refresh the graph to see the results). Try to change the shape, opacity, etc.

3

In this screenshot, the size varies from 1.5 to 100 depending on the in-degree (number of times the user was mentioned):

1

14- To ungroup the vertices, select layout options from the algorithm dropdown in the graph and select “layout entire graph” instead of group… (see step 10)

15- to save the graph as an image, right-click on it and select “save to image”

16- to share your work with others (optional), choose “export to NodeXL Gallery” from the NodeXL tab in the ribbon

Articles and videos to watch and read:

– About Twitter Network structures: http://www.smrfoundation.org/2014/03/02/6-kinds-of-twitter-social-media-network-structures/

– About social networks, mapping and measuring Connections: https://www.youtube.com/watch?v=b5RonanIOF8#t=26

– A walkthrough to using NodeXL to visualize twitter networks: https://www.youtube.com/watch?v=PC-PgkhpsNc

Facebooktwitter Facebooktwitter

Banning a non-fan from a Facebook page

A Facebook troll is someone who posts aggressive comments on your page – often immediately after you publish a post –  in an attempt of creating a firestorm of controversy.

 

Most often, these trolls do not like the page and it becomes impossible to ban them or stop them using the straightforward ban user function provided by the Facebook interface.

 

Below is a method you can use to ban a non-fan:

 

1) Find the Facebook ID of the troll. To get the id, you need to use “open graph”: Type https://graph.facebook.com/username (where username is the username of the troll, e.g. https://graph.facebook.com/john.doe)

2

 

2) Open your page and go to the settings section, “banned users” function and select “people who like this” to see the whole list of users:

3

 

3) Click on F12 or Ctrl+Shift+C to inspect the page (depends on your browser. Works both with Firefox and Chrome).

In the code, locate any “remove” button and replace the ID of the user with the troll’s ID. Beware not to change the page_id (first ID in the URL)

4

 

4) Now click on the “remove” button you edited. In this example, I used ID=4. You will need to check “Ban Permanently” to prevent the user to like, write or comment in the future:

5

 

Facebooktwitter Facebooktwitter

How to count your shares

Some social plugins give you a total number of shares without specifying exactly where those shares came from.

Also, you may need to find if someone shared your link on Facebook, Twitter and other social networking websites:

Count your shares on Facebook:

– http://graph.facebook.com/?id=YourURL, e.g. http://graph.facebook.com/?id=http://nasri.messarra.com/use-two-steps-authentication-with-google-easy-steps/

Count your shares on Twitter:

– http://cdn.api.twitter.com/1/urls/count.json?url=YourURL, e.g. http://cdn.api.twitter.com/1/urls/count.json?url=http://nasri.messarra.com/use-two-steps-authentication-with-google-easy-steps/

Count your shares on Pinterest:

- http://api.pinterest.com/v1/urls/count.json?url=YourURL, e.g. http://api.pinterest.com/v1/urls/count.json?url=http://nasri.messarra.com/use-two-steps-authentication-with-google-easy-steps/

 

Facebooktwitter Facebooktwitter

Facebook Friends Social Graph Using NetVizz and NodeXL

This post is available as a PDF document.

 

  • In Facebook, search for the NetVizz application or follow this link:1

 

  • Accept the permissions required to extract data from your timeline and pages

2

  • Select “personal network”:

3

  • Click on “start”:
  • Right click on “gdf file” and save it
  • Download and Install NetVizz to NodeXL converter
  • Run NetVizz to NodeXL converter
  • Select the Import from (GDF) and Export to (GraphML) files
  • 1
  • Make sure you have the right file names and click start
  • Open a new NodeXL file
  • From the NodeXL tab, select Import, select “from GraphML file” and select the file generated by NetVizz to NodeXL converter
  • 2
  • Generate the NodeXL graph.

Match IDs with Names in the Edges Sheet

NetVizz uses Facebook IDs instead of names. In order to create two columns. Use the following formulas to add lookup columns to the table:

– =VLOOKUP([@[Vertex 1]],Vertices[[Vertex]:[Label]],8,FALSE)

– =VLOOKUP([@[Vertex 2]],Vertices[[Vertex]:[Label]],8,FALSE)

Explanation: Look for the value of vertex 1 (or 2) in the first column (always) of the table Vertices (from column Vertex to Column Label) and get the value in the 8th column. False means that Excel should look for an exact match.

lookupformula

 

 

 

Facebooktwitter Facebooktwitter

Introduction to Social Graph and NodeXL

This post is available as a PDF document.

Why do we study social networks?

Definition from: http://en.wikipedia.org/wiki/Social_network: A social network is a social structure made up of a set of social actors (such as individuals or organizations) and a set of the dyadic ties between these actors. Social networks and the analysis of them is an inherently interdisciplinary academic field which emerged from social psychology, sociology, statistics, and graph theory.

 

From http://en.wikipedia.org/wiki/Sociometry: “Sociometric explorations reveal the hidden structures that give a group its form: the alliances, the subgroups, the hidden beliefs, the forbidden agendas, the ideological agreements, the ‘stars’ of the show”.

 

In social networks (like Facebook and Twitter), sociometry can help us understand the diffusion of information and how word-of-mouth works (virality).

Installing NODEXL (Microsoft Excel required)

NodeXL Template 2014

 

The SocialNetImporter extends the capabilities of NodeXL mainly with extracting data from the Facebook network. To install:

  • Download the latest version of the social importer plugins from http://socialnetimporter.codeplex.com
  • Open the Zip file and save the files into a directory you choose, e.g. c:\social
  • Open the NodeXL template (you can click on the Windows Start button and type its name to search for it)
  • Open the NodeXL tab, Import, Import Options (see screenshot below)

1

  • In the import dialog, type or browse for the directory where you saved your social importer files (screenshot below):

 

2

  • Close and open NodeXL again

 

For older Versions:

  • Visit http://nodexl.codeplex.com
  • Download the latest version of NodeXL
  • Unzip the files to a temporary folder
  • Close Excel if it’s open
  • Run setup.exe

 

  • Visit http://socialnetimporter.codeplex.com
  • Download the latest version of the socialnetimporter plug in
  • Extract the files and copy them to the NodeXL plugin direction. Defaults to C:\Program Files\Social Media Research Foundation\NodeXL Excel Template\PlugIns

First steps with NodeXL

The following table is a matrix showing trust within a group of 6 people. An “X” in a cell means that the person who’s name is in the cell’s row trusts the person who’s name is in the cell’s column

3

Because trust is not automatically reciprocated (Ann trusting Bob does not necessarily mean that Bob trusts Ann), the graph that we will build will be directed.

 

A directed graph implies that the edges (links) between two vertices (in our example, people) have a direction: A B. An example of a directional graph is Twitter. In Twitter, you can follow a person that does not follow you and vice-versa.

 

In an undirected graph, the edge is reciprocated. This means that, if you have a connection to a person, this person has the same connection towards you. An example of an undirected graph is Facebook: if A is a friend of B then, automatically, B is a friend of A.

Running NodeXL

  • In the Windows Start menu, click “All Programs”, then “NodeXL,” then “Excel Template.” (in Windows 8, open the tile menu and type “nodexl” to search and find the program)
  • Notice the new “NodeXL” tab in the Ribbon:

4

Drawing your first network graph

Open the vertices sheet and enter the name of the persons from the social matrix provided (above):

5

Go to the edges sheet and enter the name of the trusting person in the Vertex 1 column and the name of the trusted person in Vertex 2.

6

On the new NodeXL tab, define the graph as “directed”.

7

Click the “show graph” button for a visual representation of your graph:

810

Copy the names in the Label column and refresh your graph to have the names displayed next to the vertices:

1112

13

To replace vertices with images, copy and paste photo links (from Facebook profile photos or elsewhere) into the image column and define the shape (in the shape column) as “Image”:

14

Refresh the graph:

15

Analyzing Data

To calculate the metrics from the graph, go to the NodeXL tab and click on “Graph Metrics”:

16

Click on the “Select All” button and “calculate metrics”:

17

Understanding Metrics

In the Vertices sheet, scroll the right to display the metrics columns:

18

  • In degree: most trusted person (Edna, Bob). It is a count for the number of “arrows” that link to the person (people who trust the vertex).
  • Out degree: most trustful (Edna, Fred, Claire). It is a count for the number of “arrows” that go out from this person (how many people are trusted by the vertex).
  • Prestige is a metric you can choose to calculate yourself, it is the number of links to the person divided by the total number of possible links (in this example, the maximum would be 5 links or 5 people trusting the 6th person). A prestige of 1 means that “everyone trusts the vertex”

19

  • Betweeness centrality (Centralité d’intermédiarité) : A high number means that the person is in a central position in the graph. This metrics is based on the shortest paths between all people in the graph. It measures how important a node is by counting the number of shortest paths that it is a part of.

how many pairs of individuals would have to go through the vertex in order to reach one another in the minimum number of hops?

 

 

  • Closeness Centrality (Centralité de proximité) : who has faster access to information (in case of information diffusion). This number is an evaluation of the average distance to all nodes in the network.

What if it is not so important to have many direct friends? or be “between” others. Yet, one still wants to be in the “middle” of things, not too far from the center.

 

 

  • Eigenvector Centrality (Centralité vectorielle) : Eigenvector centrality calculates the position of a node to all other nodes in the network by giving a weight based on the distance (La centralité vectorielle essaie de mesurer l’importante ou l’influence d’un nœud dans le réseau en donnant un poids relatif à chaque lien du réseau. L’idée étant que la centralité d’un nœud est égale à la centralité des liens auxquels il est rattaché. à on tient compte de l’importance des liens auquel il est attaché). It is different from betweeness centrality in the sense that it considers all paths between nodes, not only the shortest one.

Eigenvector Centrality measures the importance of a node by the importance of its neighbors.

 

Eigenvector centrality is a measure of the influence of a node in a network. It assigns relative scores to all nodes in the network based on the concept that connections to high-scoring nodes contribute more to the score of the node in question than equal connections to low-scoring nodes

 

  • Centralité de Katz and page rank: Alors que le degré de centralité mesure le nombre de liens adjacents, la centralité de Katz mesure tous les nœuds qui peuvent être connectés à travers un chemin en pénalisant les nœuds distants.

 

Katz and Page Rank Centrality are a median solution between degree centrality (shortest paths) and eigenvector centrality (all paths) as they measure the number of all nodes that can be connected through a path, while the contributions of distant nodes are penalized.

 

  • Clustering coefficient : The clustering coefficient is a measure of an “all-my-friends-know-each-other” property. If the value of the Clustering Coefficient is equal to 1, this means that each of my friends is friend with all the others.

 

  • Reciprocated vertex pair ratio: reciprocated vertex pair ratio: ratio between ingoing and outgoing connections (only valid in directed graphs).

 

 

 

 

Facebooktwitter Facebooktwitter

NetVizz to NodeXL converter

This is a small conversion tool I have developed to convert NetVizz files (GDF) to NodeXL files (GraphML).

 

This tool works on all versions of Windows and has been tested with the “personal network” friends list extraction option in NetVizz.

 

NetVizz is a free Facebook App located at https://apps.facebook.com/netvizz/. NetVizz extracts Facebook data from personal timelines and pages.

 

NodeXL is a free, open-source template for Microsoft® Excel® 2007, 2010 and 2013 that makes it easy to explore network graphs. It can be downloaded from nodexl.codeplex.com.

 

NetVizz (GDF) to NodeXL (GraphML) is freeware.

Current Version:

NetVizz2NodeXL 2.0 Setup file for Windows

– Extracts field titles from GDF file

– Now with a progress bar

Earlier Versions:

NetVizz2NodeXL 1.0 setup file for Windows

 

Facebooktwitter Facebooktwitter

Outlook VBA code for HTML newsletter

This is an MS Outlook 2013 code to insert an HTML file into an email. File can have CSS definitions and external links to photos.

1- Go to file -> Options.2- In the “Customize Ribbon” section, check “Developer” in the Customize the Ribbon / Main Tabs panel (right) – Click OK
3- Open the Developer tab in the Ribbon. Click on Macros, Macros, Type “InsertHTML” and Create
4- In the Microsoft VBA window, click on tools -> References and make sure Microsoft Office 15.0 Object Library and Microsoft Word 15.0 Object Library are both checked- press OK
5- Copy and paste the following code:

Sub InsertHTML()
Dim insp As Inspector
Set insp = ActiveInspector
If insp.IsWordMail Then
Dim wordDoc As Word.Document
Set wordDoc = insp.WordEditor
Dim FileToOpen As String
FileToOpen = InputBox(“filename?”)
wordDoc.Application.Selection.InsertFile FileToOpen, , False, False, False
End If
End Sub

6- Save and close the Microsoft VBA editor
7- In the main menu, click on the developer tab in the ribbon, click on “Macro Security”. Select “Notification for all Macros”.8- Open a new message. Place the cursor in the empty message, go to Developer, click on Macro and select the Project1.InsertHTML macro.
9- When prompted enter the HTML file to import location.

 

Facebooktwitter Facebooktwitter

Phishing LinkedIn Invitations

New phishing email mimicking LinkedIn’s new invitation to connect. The best prevention is hovering the links in Outlook or other mail clients to make sure the URL points to LinkedIn or delete these emails and access your LinkedIn’s account to check for invitations and messages.

phishing-linkedin

Facebooktwitter Facebooktwitter

Fake Spam Facebook Friends Hit the Lebanese market

60723_4346704353426_141105871_nKenza Cullen (Photo) and other lovely blondes and brunettes are trying to make friends with Lebanese facebookers. Unfortunately for you, Kenza Cullen is a fake person and this photo is the photo of Kenza Zouiten, a half Swedish, half Moroccan model.

kenza-request

The idea is simple: people are more influenced by friends and acquaintances (strong and weak ties) than by ads. So, why not have (fake) friends tell you about what is new and good?

“Fake Kenza” has already posted about TSC, Crepaway, Bridgestone, Mike Sport and many others. She already has 157 friends who are receiving her posts on their timeline…

kenza-timeline

 

Facebooktwitter Facebooktwitter