[WordPress] 外掛分享: Social News Center

首頁外掛目錄 › Social News Center
10+
安裝啟用
尚無評分
3196 天前
最後更新
問題解決
WordPress 4.0+ v0.0.8 上架:2015-11-15

內容簡介

Social News Center 外掛可在指定的頁面和帳戶中顯示來自社交媒體網站(如 Facebook、Instagram 和 Twitter)的最新文章。還支援查看頁面和帳戶資料,以及像讚、分享、加入最愛、轉推等動作。

文章以動態排列方式展示,按照發佈、分享或轉發的日期降序排列成項目方塊。這些方塊會根據瀏覽器的寬度或網頁區域動態佈局,適用於 PC、平板電腦和智慧型手機,在不同的瀏覽器或屏幕尺寸下自動調整。每個項目方塊包含以下文章資訊:

標題:
- 發佈該文章的社交媒體帳戶的頭像。
- 社交媒體帳戶名稱,若點擊可看到彈出的個人資料。
- 社交媒體帳戶的使用者名稱,可點擊查看 ( 限 Instagram 和 Twitter )。
- 社交媒體網路圖示。

主要內容:
- 如有圖片則展示,若點擊可查看更大的圖片或內容(例如影片)。
- 文字內容包含可點擊的連結(例如 Twitter 上的主題標籤)。

頁尾:
- 發文時間(例如 N 秒、分、小時、日、月、年前)。
- 最新讚或喜歡按鈕和計數器。
- 「查看文章」鏈結 ( 限 Facebook 和 Instagram ),若點擊可在彈出視窗中顯示完整文章,或回復按鈕 ( 限 Twitter )。
- 最新分享或轉推按鈕和計數器。

註: 大多數頁尾內的按鈕會顯示目前使用者是否已經使用過該按鈕,假如這些訊息是從相關的社交媒體網路中取得的話。

此外掛快取社交媒體網路的呼叫結果,以提高整體頁面加載速度,並更好地利用開發者 API 金鑰所設定的配額。當網站使用者登入時,插件將儘可能使用使用者的配額,將開發配額作為備份供未登入的用戶使用。

疑難排解:

1. 僅特定頁面中指定了Parameters,但未顯示任何文章:
- 確認參數是否應包含在標準引號內,而不是特殊的引號,例如:[sncSocialMediaPosts facebook =”/Beer2Infinity” instagram=”@wotvine” twitter=”@beer2infinity”]
- 確認多帳戶是否在使用分號(;)分隔。例如:[sncSocialMediaPosts facebook=”/Beer2Infinity;/pgowling;/WOTvine”]
- 確認社交媒體帳戶是否包含 Facebook 的斜槓 (/)、Instagram 的 @、以及 Twitter 的 @。例如:[sncSocialMediaPosts facebook=”/Beer2Infinity” instagram=”@wotvine” twitter=”@beer2infinity”]

2. 潛在衝突:
- 「LightBoxes」──點擊圖片可能會引發與其他外掛或主題中使用 LightBox 或類似功能的彈出窗口之間的潛在衝突,例如:可以觸發兩個重疊的彈出窗口。解決方案是禁用 LightBox 或外掛功能之一中的彈出視窗功能(如果可能),或停用可能造成衝突的外掛,如有需要則查找其他選擇方案。

3. Instagram 登入按鈕不能正常運作 -- 此段描述未完成。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.0.8) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Social News Center」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Social News Center plugin displays the latest posts from social media sites such as Facebook, Instagram & Twitter for specified pages & accounts. Page and account profiles can also be viewed together with support for performing actions such as Like, Share, Favorite, Retweet and more.
Posts are displayed in item boxes which are sorted in date descending order based upon when they were posted, shared, or re-posted. The boxes are dynamically laid out within the web page based upon the width of the browser or section of the web page. The layout works on PC’s, tablets and smartphones alike automatically adjusting to the browser or screensize. Each item box contains the following information about a post:

Header:

Profile image for the social media account from which the post is being displayed.
Name of social media account which displays a popup profile if clicked.
Username of social media account which is also clickable (Instagram & Twitter only).
Social media network icon.

Body:

Photo if available which displays a larger image or content (e.g. video) if clicked.
Textual post content with clickable links (e.g. Twitter hashtags display related posts in a popup).

Footer:

Time when posted (i.e. the second, minutes, hours, days, months, or years ago).
Favorite or Like button with latest count.
‘view post’ link (Facebook & Instagram only) which displays the full post in a pop-up window or a Reply button (Twitter only).
Share or Retweet button with latest count.

Note: most buttons within the Footer will show if they have already been used by the current user assuming this information is made available from the relevant social media network.
This plugin caches results from calls to social media networks in order to improve overall page load times and to better utilize the quotas placed on developer API keys. When a web site user logs in the plugin will where possible use the user’s quota leaving the development quota as backup for those who do not login.
Troubleshooting
Parameters are specified within the shortcode but no posts are being displayed

Check that the parameters are enclosed within standard quotes and not fancy alternatives which some document editors can use e.g.

[sncSocialMediaPosts facebook=”/Beer2Infinity” instagram=”@wotvine” twitter=”@beer2infinity”]

Check that multiple accounts specified for a social media network are separated by semicolons (;) e.g.

[sncSocialMediaPosts facebook=”/Beer2Infinity;/pgowling;/WOTvine”]

Check that social media account names are prefixed with a ‘/’ for Facebook, ‘@’ for Instagram and ‘@’ for Twitter e.g.

[sncSocialMediaPosts facebook=”/Beer2Infinity” instagram=”@wotvine” twitter=”@beer2infinity”]

Potential Conflicts

“LightBoxes” – there can be potential conflicts between popups with this plugin and other plugins or themes that use LightBox or similar functionality e.g. clicking on an image can trigger two popups to overlay each other. Resolution is to disable LightBox or popup functionlity within one of the plugins (if possible) or deactivate the conflicting plugin and if needed find an alternative.

Instagram ‘Login’ button does not work within Dashboard Admin settings page

Force reload of page using SHIFT + Refresh so that the Javascript script cached by your browser is updated.

Admin settings
Accessible via the ‘Social Media Center’ menu on the left side within the admin Dashboard.
General

“Posts per Account (main)” – maximum number of Posts displayed per social media Account (or Page) on the main screen i.e. WordPress Page or Post.
“Posts per Account (popup)” – maximum number of Posts displayed per social media Account (or Page) on a popup e.g. when a Twitter hashtag (#abc) is clicked on.
“Maximum posts displayed” – maximum number of Posts displayed on a WordPress Page or Post for all social Media Accounts (or Pages).
“Cache limit (minutes)” – time for a cached item to expire i.e. the social media network will be requeried to update the specified item at this point.
“Cache reset (minutes)” – time for an item to be reset or deleted from the cache. This value must be a greater value than the Cache limit in order to have an effect.
“Cookie timeout (seconds)” – cookies will expire after this amount of time such as Filter settings (Country, State, City) e.g. 86400 = 60 secs x 60 mins x 24 hrs.
“Layout style” – color scheme used to display the item boxes containing Posts. Basic version of the plugin includes White, Neutral, Black, Red, Green, and Blue.

Facebook

“Status” – to Enable or Disable the displaying of Facebook Posts.
“App Id” – FACEBOOK_APP_ID setting to access the Facebook API

e.g. 667778899223981.

“Secret” – FACEBOOK_SECRET setting to access the Facebook API

e.g. abc9d4563232a12345dd6f321ab99778.

“App Id” & “Secret” settings can be created or retrieved via https://developers.facebook.com/apps

Instagram

“Status” – to Enable or Disable the displaying of Instagram Posts.
“Client Id” – ‘Client ID’ setting to access the Instagram API

e.g. 29ab5bd42e8g123dd88fa5bc3456dd4a.

“Client Secret” – ‘Client Secret’ setting to access the Instagram API

e.g. def3a1234567b54321ee4d222ed98765.

“Access Token” – ‘Access Token’ setting to access the Instagram API, generated by clicking the ‘Generate’ button

e.g. 2323318765.45ee4bd.ddabc1665c12349d654d443a4dfd2d6b.

“Access Token validity” – ‘Access Token validity’ setting to show whether the ‘Access Token’ is ‘valid’ or ‘invalid’, generated as a result of clicking the ‘Generate’ button

e.g. valid.

“Client Id” & “Client Secret” settings can be created or retrieved via https://www.instagram.com/developer
Note: Field ‘Valid redirect URIs’ under ‘Security’ tab needs setting to include the following two URIs whilst replacing ” with your web site domain name e.g. www.mywebsite.com, if the web site is in a sub-folder then include this too e.g. www.mywebsite.com/wordpress
http:///wp-admin/admin-ajax.php?action=snc_get_instagram_code

It is important to use 'https' rather than 'http' in the above URI if the admin area of your WordPress installation is SSL protected. The port number may also need including e.g. ':443'.

http:///wp-admin/admin-ajax.php?action=snc_instagram_oauth

It is important to use 'https' rather than 'http' in the above URI if the user facing pages of your WordPress installation are SSL protected. The port number may also need including e.g. ':443', in most web sites SSL is not used for performance purposes.

Additionally 'Client Status' can be left as 'Sandbox Mode' within Instagram Developer.

Twitter

“Status” – to Enable or Disable the displaying of Twitter Posts.
“Consumer Key” – ‘consumer_key’ setting to access the Twitter API

e.g. WD6SoDad6dsKO2FIkjghf.

“Consumer Secret” – ‘consumer_secret’ setting to access the Twitter API

e.g. FdLSWdD6RAufrmFjuyhjfm7AFvt4dr9FRvghD1L5M.

“OAuth Access Token” – ‘oauth_access_token’ setting to access the Twitter API

e.g. 879666148-uWWoWSdsG6VKNXdWaQSc8NnVGHrdCo34xOrRuNbl.

“OAuth Access Token Secret” – ‘oauth_access_token_secret’ setting to access the Twitter API

e.g. KJHmPdTsw8JTSWDArQWl2ERrsBmyLKbPV62cxS54DB.

“Replies” – to Include or Exclude replies to posts.

“Retweets” – to Include or Exclude retweets of posts.
“consumer_key”, “consumer_secret”, “oauth_access_token” & “oauth_access_token_secret” settings can be created or retrieved via https://apps.twitter.com
Shortcode Options

Place the following shortcode on any Page or Post within your WordPress website:

[sncSocialMediaPosts]

(Note that one or more social media networks with account(s) or profile(s) need specifying in order for posts to be displayed)

To display posts from the ‘Beer Infinity’ Facebook page:

[sncSocialMediaPosts facebook=”/Beer2Infinity”]

This will show a Facebook Login button too and is the same as the following:

[sncSocialMediaPosts facebook=”/Beer2Infinity” header=”Y”]

Login/logout buttons can be suppressed as follows:

[sncSocialMediaPosts facebook=”/Beer2Infinity” header=”N”]

(Note the need to preceed the Facebook account name with a ‘/’)

To display posts from the ‘Beer Infinity’ Facebook, Instagram & Twitter pages:

[sncSocialMediaPosts facebook=”/Beer2Infinity” instagram=”@beer2infinity” twitter=”@beer2infinity”]

(Note the need to preceed the Instagram & Twitter account names with an ‘@’)

To display posts from multiple Facebook, Instagram & Twitter pages:

[sncSocialMediaPosts facebook=”/Beer2Infinity;/pgowling” instagram=”@placeboworld;@thewho” twitter=”@beer2infinity;@pgowling”]

(Note the need to separate each Facebook, Instagram & Twitter Account names with a ‘;’)
Additional Info
This section includes some points to note about the behaviour of social media posts being returned by this plugin:

Actions – some actions performed on posts will not always be displayed immediately e.g. clicking Favoriting or Retweeting a Twitter post displayed by the Social News Center plugin. These actions will be displayed once the current cached item has expired or the cache has been manually emptied within the settings page.

Caching – in certain situations it is possible for protected posts to be seen after a user has logged out of a social media network due to the results still being cached. Once the cached items have expired then this will no longer be the case. Note: this does not mean that a user can see posts that they did not previously have access to!

Login/logout – there are differences between different social media networks with how Login/Logout works e.g.

Facebook – if login/logout is carried out directly within the Facebook website then the Social News Center plugin will automatically pick this up when the page is refreshed or alternatively it is possible to login/logout of Facebook within the plugin.

Instagram – login/logout on the Instagram website is not detected by the Social News Center plugin and that an additional Authorization is required within the plugin via the ‘Login’ button.

Twitter – login/logout on the Twitter website is not detected by the Social News Center plugin and that an additional Authorization is required within the plugin via the ‘Login’ button.

Partial results – please note that the social network API’s used by this plugin do not provide access to all posts and data e.g. Twitter quotes “Please note that Twitter’s search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface.”.

Posts per Account – changing this setting can sometimes not have an immediate effect due to results being cached. Reducing the value is impacted less than increasing the value as only the cached results will be displayed until it either expires or is manually emptied via the settings page.

Shortcode – the WordPress shortcode placed with Pages or Posts should only be edited in ‘Text’ mode as ‘Visual’ mode can add extra HTML coding that stops affects the shortcode syntax.

Update delays – sometimes there can be delays in posts, comments and actions becoming available through API’s which can vary between social media networks and times of the day.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon