Skip to content

Instantly share code, notes, and snippets.

View peteroravec's full-sized avatar

Peter Oravec peteroravec

View GitHub Profile
@peteroravec
peteroravec / gist:1c8f9e7c6eb5748f6ccb01ec133857dd
Last active December 25, 2016 19:46
FB API: How to create never-expiring token for posting to FB page
Steps how to create never expiring token for posting to FB page
---------------------------------------------------------------
1.) Go to https://developers.facebook.com/tools/explorer/
2.) Select you application from dropdown
3.) Click GET USER ACCESS TOKEN
4.) Select MANAGE PAGES permission
5.) Call GET on /me/accounts
6.) Find PAGE where you want to post
7.) COPY access token
@peteroravec
peteroravec / gist:9a3f2cfdeb4233466cc4
Created August 14, 2014 15:42
Wordpress - Custom fields in category (posts)
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CUSTOM FIELDS IN CATEGORY - BLOG
///////////////////////////////////
// retrieve values like this:
// -------------------------
// $category_extra_fields = get_option('category_extra_fields');
// $section_subtitle = $category_extra_fields[$category->term_id]['section_subtitle'][0];
define('MY_BLOG_CATEGORY_FIELDS', 'category_extra_fields');