Friday, November 1, 2019

Instagram Stories Branding: Marketing That Benefits Your Business

Are you using Instagram Stories to its fullest potential? Want to make your stories more consistent and engaging? To explore how to use Instagram Stories for your brand, I interview Sue B. Zimmerman on the Social Media Marketing Podcast. Sue is an Instagram marketing expert and author of The Instagram Strategy Guide. Her online course […]

The post Instagram Stories Branding: Marketing That Benefits Your Business appeared first on Social Media Marketing | Social Media Examiner.


by Michael Stelzner via Social Media Marketing | Social Media Examiner

Another Blow on Facebook’s Fact-Checking Policies – A Man Running for Governor’s Seat so He can Post False Ads on Facebook

We are here again with some spicy news on Facebook’s ad policies! Since a long time, Facebook has been facing severe criticism from social media and now from their employees as well to change Facebook’s policy on politician’s exemption from false-ads. As Facebook was not taking any action...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Madiha via Digital Information World

Thursday, October 31, 2019

Facebook Files a Copyright Lawsuit Against Two Web Hosts; Demands Hefty Amount for Damages!

In an exciting turn of events, Facebook is now the one filing a lawsuit. According to the copyright lawsuit in question, the social media giant has blamed two domain hosts (OnlineNIC and ID Shield) for trademark infringement and cybersquatting. According to Cnet, the lawsuit was filed in the US...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Ali Siddiqui via Digital Information World

Link Hover Style 87

The post Link Hover Style 87 appeared first on Best jQuery.


by Admin via Best jQuery

Pagination Style 62

The post Pagination Style 62 appeared first on Best jQuery.


by Admin via Best jQuery

How to Build a Web App with GraphQL and React

In this tutorial, we'll learn to build a web application with React and GraphQL. We'll consume an API available from graphql-pokemon and serve it from this link, which allows you to get information about Pokémon.

GraphQL is a query language for APIs and a runtime for fulfilling those queries created by Facebook. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

In this tutorial, we'll only learn the front end of a GraphQL application that makes use of Apollo for fetching data from a ready GraphQL API hosted on the web.

Let's get started with the prerequisites!

Prerequisites

There are a few prerequisites for this tutorial:

  • recent versions of Node.js and npm installed on your system
  • knowledge of JavaScript/ES6
  • familiarity with React

If you don't have Node and npm installed on your development machine, you can simply download the binaries for your system from the official website. You can also use NVM, a POSIX-compliant bash script to manage multiple active Node.js versions.

Installing create-react-app

Let's install the create-react-app tool that allows you to quickly initialize and work with React projects.

Open a new terminal and run the following command:

npm install -g create-react-app

Note: You may need to use sudo before your command in Linux and macOS or use a command prompt with administrator rights if you get EACCESS errors when installing the package globally on your machine. You can also simply fix your npm permissions.

At the time of writing, this installs create-react-app v3.1.1.

Creating a React Project

Now we're ready to create our React project.

Go back to your terminal and run the following command:

create-react-app react-pokemon

Next, navigate into your project's folder and start the local development server:

cd react-pokemon
npm start

Go to http://localhost:3000 in your web browser to see your app up and running.

This is a screenshot of the app at this point:

The current state of our app

Installing Apollo Client

Apollo Client is a complete data management solution that's commonly used with React, but can be used with any other library or framework.

Apollo provides intelligent caching that enables it to be a single source of truth for the local and remote data in your application.

You'll need to install the following packages in your React project to work with Apollo:

  • graphql: the JavaScript reference implementation for GraphQL
  • apollo-client: a fully-featured caching GraphQL client with integrations for React, Angular, and more
  • apollo-cache-inmemory: the recommended cache implementation for Apollo Client 2.0
  • apollo-link-http: the most common Apollo Link, a system of modular components for GraphQL networking
  • react-apollo: this package allows you to fetch data from your GraphQL server and use it in building complex and reactive UIs using the React framework
  • graphql-tag: this package provides helpful utilities for parsing GraphQL queries such as gql tag.

Open a new terminal and navigate to your project's folder, then run the following commands:

npm install graphql --save
npm install apollo-client --save
npm install apollo-cache-inmemory --save
npm install apollo-link-http --save
npm install react-apollo --save
npm install graphql-tag --save

Now that we've installed the necessary packages, we need to create an instance of ApolloClient.

Open the src/index.js file and add the following code:

import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { HttpLink } from 'apollo-link-http';

const cache = new InMemoryCache();
const link = new HttpLink({
  uri: 'https://graphql-pokemon.now.sh/'
})

const client = new ApolloClient({
  cache,
  link
})

We first create an instance of InMemoryCache, then an instance of HttpLink and we pass in our GraphQL API URI. Next, we create an instance of ApolloClient and we provide the cache and link instances.

Connect the Apollo Client to React Components

After creating the instance of ApolloClient, we need to connect it to our React component(s).

We'll use the new Apollo hooks, which allows us to easily bind GraphQL operations to our UI.

We can connect Apollo Client to our React app by simply wrapping the root App component with the ApolloProvider component — which is exported from the @apollo/react-hooks package — and passing the client instance via the client prop.

The ApolloProvider component is similar to React's Context provider. It wraps your React app and places the client in the context, which enables you to access it from anywhere in your app.

Now let's import the ApolloProvider component in our src/index.js file and wrap the App component as follows:

The post How to Build a Web App with GraphQL and React appeared first on SitePoint.


by Ahmed Bouchefra via SitePoint

Zuckerberg and Former Facebook Exec Spar Over The Social Network’s Initial Purpose

While Facebook has managed to weather the obstacles that came in its way as a lot of people started to mistrust it after the Cambridge Analytica scandal, its CEO Mark Zuckerberg has not really been able to find quite as much success in swaying the favor of the public towards himself. While he has...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Muhammad via Digital Information World