array( 'url' => $image_url, 'caption' => $caption, 'published' => 'true', 'access_token' => QA_FB_PAGE_TOKEN ), 'timeout' => 60 ) );} /* ============================== TWITTER POST============================== */ function qa_post_to_twitter($image_url, $caption) { // STEP 1: Upload media $media_response = qa_twitter_oauth_request( 'https://upload.twitter.com/1.1/media/upload.json', array('media' => base64_encode(file_get_contents($image_url))), 'POST' ); if (empty($media_response->media_id_string)) return; // STEP 2: Post tweet qa_twitter_oauth_request( 'https://api.twitter.com/1.1/statuses/update.json', array( 'status' => $caption, 'media_ids' => $media_response->media_id_string ), 'POST' );} /* ============================== TWITTER OAUTH CORE============================== */ function qa_twitter_oauth_request($url, $params, $method = 'POST') { $oauth = array( 'oauth_consumer_key' => QA_TW_CONSUMER_KEY, 'oauth_token' => QA_TW_ACCESS_TOKEN, 'oauth_nonce' => wp_generate_password(12, false), 'oauth_timestamp' => time(), 'oauth_signature_method' => 'HMAC-SHA1', 'oauth_version' => '1.0' ); $base_params = array_merge($oauth, $params); ksort($base_params); $base_string = strtoupper($method) . "&" . rawurlencode($url) . "&" . rawurlencode(http_build_query($base_params, '', '&', PHP_QUERY_RFC3986)); $signing_key = rawurlencode(QA_TW_CONSUMER_SECRET) . '&' . rawurlencode(QA_TW_ACCESS_SECRET); $oauth['oauth_signature'] = base64_encode( hash_hmac('sha1', $base_string, $signing_key, true) ); $header = 'OAuth '; $values = array(); foreach ($oauth as $key => $value) { $values[] = $key . '="' . rawurlencode($value) . '"'; } $header .= implode(', ', $values); $args = array( 'headers' => array('Authorization' => $header), 'body' => $params, 'timeout' => 60 ); $response = wp_remote_request($url, array_merge($args, array('method' => $method))); return json_decode(wp_remote_retrieve_body($response));} In a setback for government, IHC announced verdict against presidential notification on ECP members – TIMES OF ISLAMABAD
Times of Islamabad

In a setback for government, IHC announced verdict against presidential notification on ECP members

In a setback for government, IHC announced verdict against presidential notification on ECP members

*ISLAMABAD: **In a setback for government, IHC announced verdict againstpresidential notification on ECP members.*

*A bench of Islamabad High Court (IHC) on Monday suspended a presidentialnotification with regard to appointment of two members of the ElectionCommission of Pakistan.*

A single bench of IHC comprising Chief Justice Athar Minallah heard apetition filed by Barrister Jahangir Khan Jadoon.

In the hearing, Justice Athar Minallahlinkobservedthat the honour and prestige of the Parliament is supreme. The electedrepresentatives in the parliament should decide the matter themselves.

The National Assembly Speaker link and Senate Chairman link in ajoint endeavor should resolve the issue regarding appointment of twomembers of the ECP between the Treasury and Opposition Benches so that theprovisions of the Constitution are upheld in letter and spirit.”