The plugin only removes the corresponding "fs_****" tablesNo pro, i see some plugin not delete data on database when remove plugin.
In short it removes only the tables it uses. Not the entire database.
The plugin only removes the corresponding "fs_****" tablesNo pro, i see some plugin not delete data on database when remove plugin.
Thanks bro you save the day! as you said i tried with a different business account and its work!Ok friend, the problem is in the account settings.
Apparently pinterest has very limited to his country Brazil in terms of images.
If you change your country in the Pinterest settings for example to Peru or any other you will see how it is published successfully.
The language I left in Portuguese.
bro, it is installed but facing the same problemFor sharing videos you should install “FFprobe” and “FFmpeg” extensions on your server.
You have to create a board in advance in your account.tested for pinterest and i got error: Error! Please check the data and try again!
for cookies method, any help? thanks
Are the videos on your server or on an external one?bro, it is installed but facing the same problem
I'm glad friend, regardsThanks bro you save the day! as you said i tried with a different business account and its work!
many thanks pro, it workedYou have to create a board in advance in your account.
Then add the account on the poster and your board should appear on it.
If this does not work change the country in the account settings to Peru for the moment and test if it works.
PS: Only the country, not the language.
I'm happy for you, thank you very much for your feedback. Cheers!many thanks pro, it workedi has change to USA
check your paypal. i has donate for you!. keep in upI'm happy for you, thank you very much for your feedback. Cheers!
Thank you very much!! for your donation, this gives me a lot of incentive to continue improving and support the plugin.check your paypal. i has donate for you!. keep in up![]()
Go to:
fs-poster/App/Lib/pinterest/PinterestCookieApi.php
Replace all content:
Code:<?php namespace FSPoster\App\Lib\pinterest; use FSPoster\App\Providers\Helper; use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; class PinterestCookieApi { /** * @var \GuzzleHttp\Client */ private $client; public function __construct( $cookie , $proxy ) { $csrf_token = base64_encode( microtime(1) . rand(0, 99999) ); $cookieJar = new CookieJar(false , [ ["Name" => "_pinterest_sess", "Value" => $cookie, "Domain" => ".pinterest.com","Path" => "/","Max-Age" => null,"Expires" => null,"Secure" => false,"Discard" => false,"HttpOnly" => false,"Priority" => "HIGH"], ["Name" => "csrftoken", "Value" => $csrf_token, "Domain" => ".pinterest.com","Path" => "/","Max-Age" => null,"Expires" => null,"Secure" => false,"Discard" => false,"HttpOnly" => false,"Priority" => "HIGH"] ]); $this->client = new Client([ 'cookies' => $cookieJar, 'allow_redirects' => [ 'max' => 10 ], 'proxy' => empty($proxy) ? null : $proxy, 'verify' => false, 'http_errors' => false, 'headers' => [ 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0' , 'x-CSRFToken' => $csrf_token ] ]); } public function sendPost( $boardId , $title, $message , $link , $images ) { $imageUrl = reset($images); if( empty( $imageUrl ) ) { return [ 'status' => 'error', 'error_msg' => esc_html__('Image not fount for pin to board!') ]; } $uploadedImage = $this->uploadImage( $imageUrl ); if( $uploadedImage[0] == false ) { return [ 'status' => 'error', 'error_msg' => $uploadedImage[1] ]; } $sendData = [ "options" => [ "board_id" => $boardId, "field_set_key" => "create_success", "skip_pin_create_log" => true, "description" => $message, "link" => $link, "title" => $title, "image_url" => $uploadedImage[1], "method" => "uploaded", "upload_metric" => ["source" => "pinner_upload_standalone"] ], "context" => [] ]; try { $response = (string)$this->client->post( 'https://www.pinterest.com/resource/PinResource/create/' , [ 'form_params' => [ 'data' => json_encode( $sendData ) ] ])->getBody(); $response = json_decode( $response, true ); } catch( \Exception $e ) { $response = []; } $pinId = isset( $response['resource_response']['data']['id'] ) ? $response['resource_response']['data']['id'] : ''; if( empty( $pinId ) ) { return [ 'status' => 'error', 'error_msg' => isset($result['resource_response']['message']) ? esc_html($result['resource_response']['message']) : esc_html__('Could not upload the image!') ]; } else { return [ 'status' => 'ok', 'id' => $pinId ]; } } private function uploadImage( $image ) { try { $response = (string)$this->client->post( 'https://www.pinterest.com/upload-image/' , [ 'multipart' => [ [ 'name' => 'img', 'contents' => file_get_contents( $image ), 'filename' => 'blob', 'headers' => ['Content-Type' => 'image/jpeg'] ] ] ])->getBody(); $response = json_decode( $response, true ); } catch( \Exception $e ) { return [ false, $e->getMessage() ]; } return isset( $response['image_url'] ) ? [ true, $response['image_url'] ] : [ false, ( isset($result['resource_response']['message']) ? $result['resource_response']['message'] : esc_html__('Could not upload the image!') ) ]; } public function getAccountData( ) { try { $response = (string)$this->client->get( 'https://www.pinterest.com/resource/HomefeedBadgingResource/get/' )->getBody(); } catch( \Exception $e ) { $response = ''; } $result = json_decode( $response, true ); $id = isset($result['client_context']['user']['id']) ? $result['client_context']['user']['id'] : ''; $image = isset($result['client_context']['user']['image_medium_url']) ? $result['client_context']['user']['image_medium_url'] : ''; $username = isset($result['client_context']['user']['username']) ? $result['client_context']['user']['username'] : ''; $full_name = isset($result['client_context']['user']['full_name']) ? $result['client_context']['user']['full_name'] : ''; if( empty( $id ) || empty( $username ) ) { Helper::response( false, isset($result['resource_response']['message']) ? esc_html($result['resource_response']['message']) : esc_html__('Error! Please check the data and try again!', 'fs-poster') ); } return [ 'id' => $id, 'full_name' => $full_name, 'profile_pic' => $image, 'username' => $username ]; } public function getBoards( $userName ) { $data = [ "options" => [ "isPrefetch" => false, "privacy_filter" => "all", "sort" => "custom", "field_set_key" => "profile_grid_item", "username" => $userName, "page_size" => 25, "group_by" => "visibility", "include_archived" => true, "redux_normalize_feed" => true ], "context" => [] ]; $boardsArr = []; $bookmark = ''; while( true ) { if( !empty( $bookmark ) ) { $data['options']['bookmarks'] = [ $bookmark ]; } try { $response = (string)$this->client->get( 'https://www.pinterest.com/resource/BoardsResource/get/?data=' . urlencode( json_encode( $data ) ) )->getBody(); $response = json_decode( $response, true ); } catch( \Exception $e ) { $response = []; } if( !isset( $response['resource_response']['data'] ) || !is_array( $response['resource_response']['data'] ) ) { $boards = []; } else { $boards = $response['resource_response']['data']; } foreach ( $boards AS $board ) { $boardsArr[] = [ 'id' => $board['id'], 'name' => $board['name'], 'url' => ltrim( $board['url'], '/' ), 'cover' => isset($board['image_cover_url']) ? $board['image_cover_url'] : '' ]; } if( isset( $response['resource_response']['bookmark'] ) && is_string( $response['resource_response']['bookmark'] ) && !empty( $response['resource_response']['bookmark'] ) && $response['resource_response']['bookmark'] != '-end-' ) { $bookmark = $response['resource_response']['bookmark']; } else { break; } } return $boardsArr; } }
And try now and report please
Hello, no longer pay attention to that, your problem was the country in the settings of pinterest. We solve it by changing the country.me too, i got error image when auto post to pinterest, hmm the author can't fix that?
i hope your fix can working fine
Please clean cache next go to:
Thanks for your quick response, but I am trying this into my development environment and I am not using any cache plugin out there.Please clean cache next go to:
I just checked and it works fine.
Yes please send your cpanel credentials and access to wordpress to review it by private messageThanks for your quick response, but I am trying this into my development environment and I am not using any cache plugin out there.
If you wish I can provide you admin credentials if you can help me out.
Thanks in advance.
The issue of @elmocando was solved.Thanks for your quick response, but I am trying this into my development environment and I am not using any cache plugin out there.
If you wish I can provide you admin credentials if you can help me out.
Thanks in advance.
Could you lend me your private proxy server to try on my server if I get the error?@lgokul
hi mani have problem in cookie method of facebook i cant use proxy
in console i have these errors
www.paypalobjects.com/en_PE/i/scr/pixel.gif:1 Failed to load resource: the server responded with a status of 404 ()
and
admin.php?page=fs-poster&tab=fb:1 Uncaught TypeError: $ is not a function
at HTMLDivElement.onclick (admin.php?page=fs-poster&tab=fb:1)
onclick @ admin.php?page=fs-poster&tab=fb:1