Since a while its possible to post on Facebook multilingual:
https://code.facebook.com/posts/597373993776783/building-a-better-way-to-write-posts-in-multiple-languages/
I'm posting on my page in German and English and I wanna integrate my Facebook posts on a website. If you use the website English, I wanna present them the English versions of my posts.
So, I try to get the posts multilinugal, but I couldn't find any option in the Graph API Explorer. The posts always show up in the default language.
https://developers.facebook.com/tools/explorer/
Is it possible to get (feed) Facebook posts multilingual?
You can use the locale parameter for that,
https://developers.facebook.com/docs/graph-api/using-graph-api/#readmodifiers:
locale
Used if your app needs the ability to retrieve localized content in the language of a particular locale (when available).
If the post is available in the requested locale, you will get that one returned - otherwise, the “default” language version of the post.
Related
This is my first time working with Wordpress APIs, and i'm not a PHP developer. Essentially our client just wanted us to display WordPress articles in our react-native app with simple data like the:
date
title
content
thumbnail
etc..
...anything you'd find in the default response, and this was easy. We simply used the default endpoints like this one: https://demo.com/wp-json/wp/v2/posts?categories=1015
Anyways... Our client now wants to display the "view count" of each article. However, i can't find that data in the default response:
Is there a way to get this view count data, and have it return in the API response, without having to customize every single endpoint?
Thanks
I am using OJS cms, which is a Open Journals System.
I want to add some parts to registration page.
In registration page I want to know what language/locale is set, in order to put some more fields if specific language/locale is set.
I want current locale of the site. How can I recognize what locale is set by user by if statement? I searched stackoverflow but and found some result but non of them were helpful for me.
By the way, this cms is written by PHP. For more inforemation click here.
The best way is to use {$currentLocale}. It tells us what language the website is set in.
I did one sample to get page post using graph API. But it will fetch all the posts. For example, if the page shares anything from another page, it also fetched from api. I only need the post which is added by that page. Is the feature available in facebook API.
The below URL fetches all the post.
https://graph.facebook.com/page_id/posts?access_token=access_token
According to Facebook Docs for Page Feed
It clearly states that:
/{page-id}/posts shows only the posts that were published by this page.
/{page-id}/tagged shows all public posts in which the page has been tagged.
/{page-id}/promotable_posts shows only the posts that can be boosted (includes unpublished and scheduled posts).
Please check the docs properly and if you want to customize it more then you can do that at your end while parsing the results.
I just started using the eBay API, but couldn't find a way to accomplish my needs. Also this should be really simple normally.
I want to know if it is possible to pass just any eBay URL to the API (PHP) and get a new link with my affiliate-parameters added.
It should just work the same way like the Link Generator in the Partner-Network-Section on eBay.
For example:
www.ebay.de/some-ebay-url/
Should be turned into something like:
http://rover.ebay.com/rover/x/xxx-xxxxx-xxxxx-x/x?xxx=4&pub=[my_publisher_id]&toolid=10001&campid=[my_campaign_id]&customid=&mpre=http%3A%2F%2Fwww.ebay.de%2Fsome-ebay-url
Or is there a easy way to just add my Affiliate id to an ordinary link?
Thanks
There isn't an API call at eBay to do what you want, in part because you can do it yourself pretty easily. You kinda already did it yourself with your example - yes, it's that easy.
You basically use the Link Generator just once (or a few times, to get acquainted with things) to obtain the template of a rover link and select the Custom URL option, then you use that format with any eBay URL you like, making any required tweaks. Take the eBay URL you want, URL encode it, then insert it as the &mpre= parameter at the end of the affiliate/rover link. That's the gist of it.
Know that &pub= is optional and doesn't affect the tracking of your link. &campid= is the necessary tracking parameter.
The long numerals in the front of the rover link (Rotation/Placement ID) define what ePN program to attribute tracking to. You might need to parse your input URL to determine the eBay domain (eBay.com? eBay.de?) to decide which Rotation/Placement ID to use, although they may/should work for cross-site tracking if you desire.
I've documented all the Rotation IDs here on my site. Click the page title up top for the main site with more eBay technical info I've discovered over the years.
I know that on a Facebook fan page, if you want to make a post visible to only a specific set of people based on their facebook language we can do that. For Eg. If I want to post a post that is visible to only people who have set Facebook language to French, then I can set the "Make visible: language -> French" when I post it.
Now, I want to do this programmatically. I have 2 sets of text. I want to post one of them to a certain set of languages and other for just french. Say, first set for "English, Spanish, Polish" while the second set for just "French". How can I do this programmatically? Does facebook API allows us to do that?
Thanks.
I've not tried this but the documentation here https://developers.facebook.com/docs/reference/api/page/#posts seems to imply you can include a "targeting" property. Try playing around with that in the graph api explorer to see if it achieves what you are after. I'm assuming you know how to use the api as you merely mentioned the language side of it. If you don't know what you can do with the api then I suggest you check out the docs as mentioned by Matt in the comments