twitter – WordPress Rest API – Draft, then Publish

and thanks in advance for the help,

I’ve been using the WordPress REST API, in combination with an automated tweeting tool, to post onto my site and have the post automatically shared to Twitter. The only complaint I have is that the link previews on Twitter do not include my post’s featured image.

After a bit of digging, I realized that this was because WP could not register the image before the plugin posts to twitter, and therefore has no image to show in the link preview. I cannot delay the tweets, so my only choice is to store the post, and then tweet it out ~30 seconds later. I’ve played around with the ‘date’ field but even setting it to the future doesn’t work.

Is there any way I can first set the post status to draft, then set it to publish 30 seconds later?

java – Graph API facebook – obter campo plataform “fb”

Olá,
Desde ja agradeço toda a ajuda possivel.
É o seguinte, como é que por java ou mesmo pelo graph api do facebook, obtenho a plataforma (“fb” ou “ig”) que está a ser utilizada, quando se cria uma lead.
Por exemplo, eu crio uma lead/formulario, e a pessoa pelo facebook dela preenche e envia. Se eu fizer download do ficheiro csv, ele tras a informação toda preenchida, inclusivé o tipo de plataforma, neste caso “fb”:

inserir a descrição da imagem aqui

Agora como é que pelo graph api ou por um request obtenho esse campo plataform:
inserir a descrição da imagem aqui

Já tentei de tudo, e consigo atraves do id da lead obter a informação toda, nome, email, telefone, is_organic,.. mas a platform não consigo obter.

O código que estou a fazer request é o seguinte:

String urlGet = "https://graph.facebook.com/v5.0/" + idLeadGenerated + "https://pt.stackoverflow.com/";
logger.debug("urlGet.......:" + urlGet);

FacebookLead oFacebookLead = new FacebookLead();

Client client = ClientUtil.createClient(true);
WebResource webResource = client.resource(urlGet);
ClientResponse response = webResource
                                .queryParam("access_token", acessToken)
                                .type(MediaType.APPLICATION_FORM_URLENCODED_TYPE)
                                .accept(MediaType.APPLICATION_JSON)
                                .get(ClientResponse.class);

int statusResponse = response.getStatus();

String gsonResponse = response.getEntity(String.class);
logger.trace("gsonResponse.......:" + gsonResponse);

Este código retorna a informação da lead, como nome, email, … eu preciso de informação da plataforma tipo “fb” que é facebook. Alguma dica?

Obrigado.

webserver – Alternative to google API (e.g. jquery) for charting w/o privacy concerns

Having read this post : Privacy risk in using Google APIs, I am wondering what are the alternatives with no privacy concern, esp. for website charting development, anyone has experience with e.g. chart.js?

PS: first post here, don’t know if I could ask here or to other forum, thanks!

c# – Create a Generic Controller that has all entities in OData Web API

I have a Master table in database with list of other tables whose details I want to fetch through the API.
Steps to be incorporated –
1. Create a Generic OData Controller to fetch Master table details.
2. Because does not want to create controller for each entity in Master table, so want each entity in Master table to get registered automatically so that it can be accessed through API without building each of their controller.

I am pretty new to building Web APIs using OData. So require some help as to how go forward with this requirement

Simple Fetch API Wrapper with Concise File Upload

https://github.com/WebsiteBeaver/far-fetch

There’s many advantages this wrapper has over similar ones, but I will highlight file uploading.

async uploadFiles() {
  const photos = document.querySelector('#photos').files;
  const videos = document.querySelector('#videos').files;

  await ff.put('https://example.com/upload', {
    data: { name: 'Jeremy' },
    files: { photos, videos },
  });
}

Code (markup):

Doing this in vanilla fetch would require creating a new FormData object, traverse files in separate arrays and then append it to the FormData, followed by appending any request data needed. Then this would be passed into the body as a stringified object, along with the header content type being set to JSON.

This is so much extra work that could be saved by using FarFetch, which aims to simplify tasks like this.
SEMrush

 

domain driven design – How can we use DDD when data comes from API?

And since then my application is back to having all the logic in Service layer.

There are two things that you can do here.

The key idea is that “retrieving data” is a completely different concern from “processing” data. Retrieving data needs IO, so that concern is normally managed by your application components. Processing data is a problem for your domain logic.

So we use application code to get the data, then pass the in-memory representations of that data to the domain code.

One approach is to treat “retrieve the data” as something analogous to a domain service. So the domain model defines some interface that describes an implementation agnostic retrieve of the data, and the application implements an instance of that interface, wired up to the correct IO mechanism. For use cases that need the remote data, the interface of the aggregate root includes in its target method(s) an argument of the appropriate interface.

In effect you “dependency inject” the application’s implementation of the interface into the function.

An alternative approach is to have the domain model ask for the data it needs, which the application service retrieves and passes to the domain model as a value. So all of the IO concern lives in the application component, and the aggregate root acts like a little state machine that tells the application what it wants.

switch (root.state()) {
    case I_NEED_DATA:
        data = getTheData(root.args())
        root.onData(data)
        break
    //....
}

See Cory Benfield’s talk on Building Protocol Libraries to get a broader sense for how this might work.

If the distinction between the two styles in unclear, you might reflect on how you would write an isolated test for your domain code in each case. Using the first pattern, you would end up passing a test double (aka a “mock”) to the logic under test. In the second pattern, you would end up passing plain old data (because all of the I/O that you would otherwise need to mock away is invoked by the application code, not the domain code).

PlayTube.ws – 70$ / 15K – DMCA Ignored – API – Unlimited – Fast Support | NewProxyLists

Hello NewProxyLists!

I’m Mucha, affiliate manager at PlayTube.ws. Finally playtube is arriving at wjunction with it’s services! Fully unlimited website with fast servers.

Current Website Features:

– Unlimited Storage
– Remote Upload From:

  • gounlimited
  • clipwatching
  • vidoza
  • oogly
  • upstream

our Remote Upload supports above hosts + direct download links(hotlinks)
– Normal Upload (30GB per file)
– No DMCA removals*
– No stream speed restrictions
– HD Encoding (We support HD videos)
– 24/7 Support (Available via Discord, Skype) – PM me for one of those or both :)

Affiliate Info:

  • – Minimal Payout 20$
  • – Payments every Monday.
  • – 3 views per user * 24h are counted for payouts.
  • – Real rates**
  • – PayPal, Bitcoin payment methods
  • – 15 minutes long video is eligbe for affiliate program

Here you can find our rates!

Coming Soon Features:

– Remote SRT Upload / SRT Upload
– API

* – We completly ignore dmca reports if they’re not sent from Ukraine.
** – We do not boost our rates to amounts that we can’t actually pay, our rates are stable and you’re guaranteed that money will be on time.

If you have any questions, please feel free to ask. We’re looking to offer the people a very long term platform, your opinion matters to to us because we can keep improving our services.

API for raw Bitcoin latest block data?

I would like to get the full raw data on the latest bitcoin block. I was hoping I could get this from an API.

I looked at blockchain.com’s API’s but these don’t seem to provide the full data for each block including the header and transactions.

Does anyone know of a good source for this? Or should I be looking at alternatives to an API?

How to generate confirmation code without conflict in Spring Boot API?

I am making an website that has register and login functionality which works fine. However, I want to add confirmation code process after the registration process.

I can create a random confirmation code in frontend(Angular) side and send with SMTP protocol to user email account and user should enter this confirmation code in 2 minutes. However when I think more, it can cause a conflict(very slight possibility but not impossible) like it can be generated same confirmation code in 2 minutes.

So, now I decided to generate confirmation code in backend side(Spring Boot) and make the confirmation checking in backend side. So, in backend side I should control the generated confirmation code is generated already in 2 minutes.

So, I can use a dynamic list that has active confirmation codes and search the generated confirmation code in the list. If the code exist in the list, then create another one until the list doesn’t have.

How can I create a dynamic global list that can be visible among all different request in Spring Boot?
Or there is another way(best practice) for this confirmation process?

connect api gounlimited with a player | NewProxyLists

Hello,
I took premium traffic from gounlimited but it works only with L’pi de gounlimited

in short I would like to connect API gounlimited with an open source player that works with wordpress

if someone can tell me how to do it would be great

Thank you :]