Showing posts with label Facebook. Show all posts
Showing posts with label Facebook. Show all posts

Did search engine results cut the traffic to personal blogs?

I have noticed a very unsettling statistic on my blog.
This prompted a fascinating question about AI, blogs' future, and maybe even the Internet.

Some research has confirmed my observation. There is widespread fear and doom across the blogosphere.


In this blog post, I discuss how changes in Google's search algorithms have decreased traffic to personal blogs by favoring direct answers instead of linking to external content. 

I explore the repercussions for small businesses and bloggers and speculate on possible strategies for adapting, such as creating more unique content and focusing on niche topics.



Per Uki's request, DALL·E 2024-04-21 07.51.44

A conceptual digital art piece depicting the abstract idea of artificial intelligence impacting personal blogs.



As an Amazon Associate I earn from qualifying purchases.

How to add Facebook LIKE, Recommend, and Share buttons to your Blogger?

How to generate Facebook CODE specific to my site?


1. Visit the following site and choose the options you like.

https://developers.facebook.com/docs/plugins/like-button/


How to update the Blogger.com page?

WARNING:

  • Please backup your blog first, see below. 
  • I assume that you have some experience with HTML/CSS/JavaScript


2. Open your Blogger.com > Design > Theme > Customize (please backup here) > Edit HTML

3. Control-F to find: <body

4. Paste the first script provided by Facebook


<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
<!-- START Facebook buttons Recommend and Share -->
<!-- https://developers.facebook.com/docs/plugins/like-button/ -->
<div id='fb-root'/>
<script async='async' crossorigin='anonymous' defer='defer'
nonce='Om0b5IFR'
src='https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;
version=v14.0&amp;appId= SOMETHIG FOR YOU &amp;autoLogAppEvents=1'/>
<!-- END Facebook buttons Recommend and Share -->

5. Control-F to find: post-icons

6. Paste the second part of the script generated by Facebook


<!-- START Facebook buttons Recommend and Share -->
<br/><br/>
<div class='fb-like'
data-action='recommend'
data-layout='button_count'
data-share='true' data-size='large'
data-width=''
expr:data-href='data:post.url'
/>
<br/><br/>
<!-- END Facebook buttons Recommend and Share -->
</span> <span class='post-icons'>

Please note that I replaced the URL you provided to Facebook with expr:data-href='data:post.url'

This will load the given post's URL and not the static link you provided.

You should be able to see the blue buttons underneath this post, please click BOTH!


As an Amazon Associate I earn from qualifying purchases.

Facebook and OpenSocial presentations

Here are some useful links from my two presentations at the GTUG conference at Google Chicago last night.

Facebook Connect
OpenSocial

OpenSocial
OpenSocial 4 GWT


As an Amazon Associate I earn from qualifying purchases.

Facebook and OpenSocial presentations

Here are some useful links from my two presentations at the GTUG conference at Google Chicago last night.

Facebook Connect
OpenSocial

OpenSocial
OpenSocial 4 GWT


As an Amazon Associate I earn from qualifying purchases.

FriendFeed

FriendFeed.com allows you to aggregate all of your social networking life in one place and it works wonderfully...
- your facebook
- your Twitter
- you status updates from the Google Talk
- your blogs
- list goes into dozens

But what I absolutely LOVE about it, FriendFeed allows you to create IMAGINARY FRIENDS...

now I can follow blogs, tweets of people that would not be (or I would not like them to be) my friends on facebook, or Twitter.

Example: I am following a impersonation of the Steve Jobs and trust me, that guy is fun to read!




As an Amazon Associate I earn from qualifying purchases.

Publish Stories to Facebook with Templates

When using Facebook Connect or any other Facebook app to post stories to users’ walls and news feeds, Facebook provides a way to customize exactly what information will appear and how. This mechanism is called Template Bundles. This article demonstrates how to create a template step by step.  In a second article, I explore one technology for actually posting stories with this template—GWT and the facebook4gwt library.

Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developers/ and click your application on the right.

image

From the application, click “Create Feed Template”.

image

This takes you to a utility for creating templates. Select your application in the dropdown and click “Next”.

image

Stories can be posted to Facebook in one of two forms, "One Line Story” and “Short Story”. Each template can specify both forms. First you will be prompted to specify the “One Line Story” form. Fill in the template as desired. A sample preview is shown on the right side of the page.

image

Click “Next”. Now you are prompted to fill in the “Short Story” form. With both forms we specify tokens within the text that will be replaced with values specified when the story is posted. Tokens use the {*token*} syntax. There are some predefined tokens like {*actor*}, and you can also specify your own using any token text you like. Here I am using my own token {*headline*}.

image

Click “Next”. You can specify an optional link that appears with both template forms. Again, tokens are allowed. I am using another custom token, {*url*}.

image

NOTE: In order for the sample preview to show, Facebook requires that we specify data for all custom tokens in the “Sample Template Data” box. You can see that I added “headline” and “url” here. This does not affect our template at all, just the preview we see on this screen.

image

Click “Next”. A final preview is shown. If you’re happy with your template, click “Register Template Bundle”.

A confirmation popup appears with the ID number of the template. You will use this number to reference this template when making posts. Don’t worry about copying it down if you don’t need it immediately; you can always look it up later.

image

That’s all there is to it. You can now use any of the Facebook APIs to post stories using your template. In another article I explore an example of this with a GWT application, taking advantage of the open source facebook4gwt library.



As an Amazon Associate I earn from qualifying purchases.

Publish Stories to Facebook with Templates

When using Facebook Connect or any other Facebook app to post stories to users’ walls and news feeds, Facebook provides a way to customize exactly what information will appear and how. This mechanism is called Template Bundles. This article demonstrates how to create a template step by step.  In a second article, I explore one technology for actually posting stories with this template—GWT and the facebook4gwt library.

Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developers/ and click your application on the right.

image

From the application, click “Create Feed Template”.

image

This takes you to a utility for creating templates. Select your application in the dropdown and click “Next”.

image

Stories can be posted to Facebook in one of two forms, "One Line Story” and “Short Story”. Each template can specify both forms. First you will be prompted to specify the “One Line Story” form. Fill in the template as desired. A sample preview is shown on the right side of the page.

image

Click “Next”. Now you are prompted to fill in the “Short Story” form. With both forms we specify tokens within the text that will be replaced with values specified when the story is posted. Tokens use the {*token*} syntax. There are some predefined tokens like {*actor*}, and you can also specify your own using any token text you like. Here I am using my own token {*headline*}.

image

Click “Next”. You can specify an optional link that appears with both template forms. Again, tokens are allowed. I am using another custom token, {*url*}.

image

NOTE: In order for the sample preview to show, Facebook requires that we specify data for all custom tokens in the “Sample Template Data” box. You can see that I added “headline” and “url” here. This does not affect our template at all, just the preview we see on this screen.

image

Click “Next”. A final preview is shown. If you’re happy with your template, click “Register Template Bundle”.

A confirmation popup appears with the ID number of the template. You will use this number to reference this template when making posts. Don’t worry about copying it down if you don’t need it immediately; you can always look it up later.

image

That’s all there is to it. You can now use any of the Facebook APIs to post stories using your template. In another article I explore an example of this with a GWT application, taking advantage of the open source facebook4gwt library.



As an Amazon Associate I earn from qualifying purchases.

Integrate your GWT app with Facebook in 4 easy steps

Step 1: Register you app with Facebook.

Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developers/ and click “Set Up New Application.”


Enter a name for your application.


Make note of your API Key. You will need this later. You can come back to this page any time to get it.


Click the “Connect” section on the left. Then enter the base domain name of the website where your application is hosted into the “Connect URL” field. Click the “Save Changes” button at the bottom of the page.


That’s it. You are now the proud developer of a Facebook application, which is required for using Facebook Connect.

Unlike most of the Facebook applications we are used to seeing on the Facebook site, our application does not have an interface for users on the Facebook site. This is something you could certainly add it you need it, but it is not necessary when using Facebook Connect.

Step 2: Add the facebook4gwt JAR to your project .
Go to http://code.google.com/p/facebook4gwt/. Click “downloads” and grab the latest JAR.

Add the JAR to the build path of your GWT project. I’m using an Eclipse project and building it with the Google Eclipse plugin. So I just go to the configure build path dialog, click “Add JARs…” or “Add External JARs…” and select the JAR I just downloaded.

Now add the following line to your module XML file to tell it to include the facebook4gwt module.

<inherits name="com.reveregroup.gwt.facebook4gwt.Facebook4gwt"></inherits>

Step 3: Initialize Facebook Connect.

Facebook Connect needs to be initialized on your web page before using any of its features.

With facebook4gwt, this is accomplished with one simple call:

Facebook.init(YOUR_API_KEY);

This is the API Key that we noted in Step 1 above.

I am making the call in the onModuleLoad() method of my EntryPoint, but you can put it anywhere as long as it comes before you try to use any of its other features.

Step 4: Use the API
Now you’re ready to connect with Facebook. Here are a few examples of what you can do.

Provide a login button
The vast majority of Facebook Connect features require a user to be logged in to Facebook through your site. The API provides a login button that can be placed on your page for a visitor to sign in. It can be used as any other GWT Widget:

loginButton = new LoginButton();
RootPanel.get("facebookLogin").add(loginButton);

Listen for login events
You can register a login listener that is fired whenever a user logs in or out:


Facebook.addLoginHandler(new FacebookLoginHandler() {
public void loginStatusChanged(FacebookLoginEvent event) {

if (event.isLoggedIn()){

statusLabel.setText("Logged in");

} else {

statusLabel.setText("No user logged in");
}

}

});

Get information about a user
The API exposes methods for getting information about the current user or any user given their numeric ID.

In this example we get the current user’s name, status and profile picture. It’s an asynchronous call, so the result is returned to an instance of AsyncCallback.

You also need to specify which information you want the call to fetch for you. These methods use varargs to allow you to easily specify as many items as you need. UserField is an enum with all the possible items.


Facebook.APIClient().users_getLoggedInUser(new AsyncCallback() {
public void onSuccess(FacebookUser result) {
userName.setText(result.getName());

userImage.setUrl(result.getPic());

userInfoPanel.setVisible(true);

}
public void onFailure(Throwable caught) {
userInfoPanel.setVisible(false);
}
}, UserField.NAME, UserField.STATUS, UserField.PIC);


Share with friends
You can add Facebook “Share” buttons to your page in various styles. Again these are just GWT widgets.

new ShareButton(URL_TO_SHARE, TITLE_FOR_POST);

A more advanced option is to post to the user’s wall using templates to customize exactly what information is shown and how. For more on creating facebook feed templates see this blog entry.

The API works like this...

  1. Create an instance of FacebookStory and set the template bundle
    id. You should be able to find the this id with the template you created on
    Facebook's site.
  2. Set the content for your post:

    • Set any key-value pairs of data that your template needs using the
      putData(String, String) method.
    • Add the images, video, mp3 or flash data you want (if any).
    • Set bodyGeneral if desired.

  3. Optionally, configure the dialog with setPrompt() and setDefualtUserMessage().
  4. Finally, call showFeedDialog(). This will display a dialog
    window for your user to confirm the message and possibly add their own
    comments. If they approve, the message will be posted to their wall and to
    their friends news feeds.

Here is an example:

FacebookStory fbStory = new FacebookStory();
fbStory.setTemplateBundleId(Constants.FEED_TEMPLATE_ID);
fbStory.setPrompt("Add your thoughts if you like...");
fbStory.putData("headline", article.getHeadline());
fbStory.putData("story_url", Constants.APP_URL);
fbStory.setBodyGeneral(article.getContent());
fbStory.addImage(article.getImageURL(), Constants.APP_URL);
fbStory.showFeedDialog();

And here's the confirmation dialog displayed by this code.



That's about all there is to it. The actual Facebook API has many more features available than shown here. Over time the facebook4gwt team hopes to build more and more of these features into their implementation, so be watching for that.


As an Amazon Associate I earn from qualifying purchases.

Integrate your GWT app with Facebook in 4 easy steps

Step 1: Register you app with Facebook.

Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developers/ and click “Set Up New Application.”


Enter a name for your application.


Make note of your API Key. You will need this later. You can come back to this page any time to get it.


Click the “Connect” section on the left. Then enter the base domain name of the website where your application is hosted into the “Connect URL” field. Click the “Save Changes” button at the bottom of the page.


That’s it. You are now the proud developer of a Facebook application, which is required for using Facebook Connect.

Unlike most of the Facebook applications we are used to seeing on the Facebook site, our application does not have an interface for users on the Facebook site. This is something you could certainly add it you need it, but it is not necessary when using Facebook Connect.

Step 2: Add the facebook4gwt JAR to your project .
Go to http://code.google.com/p/facebook4gwt/. Click “downloads” and grab the latest JAR.

Add the JAR to the build path of your GWT project. I’m using an Eclipse project and building it with the Google Eclipse plugin. So I just go to the configure build path dialog, click “Add JARs…” or “Add External JARs…” and select the JAR I just downloaded.

Now add the following line to your module XML file to tell it to include the facebook4gwt module.

<inherits name="com.reveregroup.gwt.facebook4gwt.Facebook4gwt"></inherits>

Step 3: Initialize Facebook Connect.

Facebook Connect needs to be initialized on your web page before using any of its features.

With facebook4gwt, this is accomplished with one simple call:

Facebook.init(YOUR_API_KEY);

This is the API Key that we noted in Step 1 above.

I am making the call in the onModuleLoad() method of my EntryPoint, but you can put it anywhere as long as it comes before you try to use any of its other features.

Step 4: Use the API
Now you’re ready to connect with Facebook. Here are a few examples of what you can do.

Provide a login button
The vast majority of Facebook Connect features require a user to be logged in to Facebook through your site. The API provides a login button that can be placed on your page for a visitor to sign in. It can be used as any other GWT Widget:

loginButton = new LoginButton();
RootPanel.get("facebookLogin").add(loginButton);

Listen for login events
You can register a login listener that is fired whenever a user logs in or out:


Facebook.addLoginHandler(new FacebookLoginHandler() {
public void loginStatusChanged(FacebookLoginEvent event) {

if (event.isLoggedIn()){

statusLabel.setText("Logged in");

} else {

statusLabel.setText("No user logged in");
}

}

});

Get information about a user
The API exposes methods for getting information about the current user or any user given their numeric ID.

In this example we get the current user’s name, status and profile picture. It’s an asynchronous call, so the result is returned to an instance of AsyncCallback.

You also need to specify which information you want the call to fetch for you. These methods use varargs to allow you to easily specify as many items as you need. UserField is an enum with all the possible items.


Facebook.APIClient().users_getLoggedInUser(new AsyncCallback() {
public void onSuccess(FacebookUser result) {
userName.setText(result.getName());

userImage.setUrl(result.getPic());

userInfoPanel.setVisible(true);

}
public void onFailure(Throwable caught) {
userInfoPanel.setVisible(false);
}
}, UserField.NAME, UserField.STATUS, UserField.PIC);


Share with friends
You can add Facebook “Share” buttons to your page in various styles. Again these are just GWT widgets.

new ShareButton(URL_TO_SHARE, TITLE_FOR_POST);

A more advanced option is to post to the user’s wall using templates to customize exactly what information is shown and how. For more on creating facebook feed templates see this blog entry.

The API works like this...

  1. Create an instance of FacebookStory and set the template bundle
    id. You should be able to find the this id with the template you created on
    Facebook's site.
  2. Set the content for your post:

    • Set any key-value pairs of data that your template needs using the
      putData(String, String) method.
    • Add the images, video, mp3 or flash data you want (if any).
    • Set bodyGeneral if desired.

  3. Optionally, configure the dialog with setPrompt() and setDefualtUserMessage().
  4. Finally, call showFeedDialog(). This will display a dialog
    window for your user to confirm the message and possibly add their own
    comments. If they approve, the message will be posted to their wall and to
    their friends news feeds.

Here is an example:

FacebookStory fbStory = new FacebookStory();
fbStory.setTemplateBundleId(Constants.FEED_TEMPLATE_ID);
fbStory.setPrompt("Add your thoughts if you like...");
fbStory.putData("headline", article.getHeadline());
fbStory.putData("story_url", Constants.APP_URL);
fbStory.setBodyGeneral(article.getContent());
fbStory.addImage(article.getImageURL(), Constants.APP_URL);
fbStory.showFeedDialog();

And here's the confirmation dialog displayed by this code.



That's about all there is to it. The actual Facebook API has many more features available than shown here. Over time the facebook4gwt team hopes to build more and more of these features into their implementation, so be watching for that.


As an Amazon Associate I earn from qualifying purchases.

apt quotation..