npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

share-facebook

v1.0.1

Published

Create a Facebook share url with ease

Downloads

9

Readme

share-facebook Build Status codecov

Create a Facebook share url with ease

Install

$ yarn add share-facebook

Usage

const shareFacebook = require('share-facebook')

shareFacebook({
  quote: 'Check this library to help you create share facebook url',
  href: 'https://bukinoshita.io',
  redirect_uri: 'https://bukinoshita.io',
  app_id: 'APP_ID'
})
// https://www.facebook.com/dialog/share?app_id=APP_ID&redirect_uri=https://bukinoshita.io&display=page&quote=Check%20this%20library%20to%20help%20you%20create%20share%20facebook%20url

Examples

Check the examples

API

shareFacebook([options])

Returns a string

app_id

Type: string Example: APP_ID Required

Your app's unique identifier.

redirect_uri

Type: string Example: https://bukinoshita.io Required

The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection.

display

Type: string Default: page Example: page

Determines how the dialog is rendered.

  • If you are using the URL redirect dialog implementation, then this will be a full page display, shown within Facebook.com. This display type is called page.
  • If you are using one of our iOS or Android SDKs to invoke the dialog, this is automatically specified and chooses an appropriate display type for the device.
  • If you are using the Facebook SDK for JavaScript, this will default to a modal iframe type for people logged into your app or async when using within a game on Facebook.com, and a popup window for everyone else. You can also force the popup type when when you use the Facebook SDK for JavaScript, if necessary.
  • Mobile web apps will always default to the touch display type.

href

Type: string Example: https://bukinoshita.io

The link attached to this post. Required when using method share. Include open graph meta tags in the page at this URL to customize the story that is shared.

hashtag

Type: string Example: #facebook

A hashtag specified by the developer to be added to the shared content. People will still have the opportunity to remove this hashtag in the dialog. The hashtag should include the hash symbol.

quote

Type: string Example: share with FB

A quote to be shared along with the link, either highlighted by the user or predefined by the developer, as in a pull quote on an article.

mobile_iframe

Type: boolean Default: false Example: true

If set to true the share button will open the share dialog in an iframe on top of your website (For more information see Mobile Web Share Dialog. This option is only available for mobile, not desktop.

Related

License

MIT © Bu Kinoshita