Comments (11)
Can you give a full example of a script to show the problem (with an example of an actual tumblr)?
(just do not expose your credentials)
from tumblr.php.
for example this api url returns 404 error
https://api.tumblr.com/v2/blog/mel-tedchocolate.tumblr.com/posts?api_key=your_key
from tumblr.php.
You need to exchange your_key
in that url with your API consumer key.
from tumblr.php.
Hey, @AkgunFatih , Oli was just trying to help you. If you don't treat people with more respect, they are not going to want to help fix your problems.
I asked for a full example script (which you did not provide) because I thought you were probably only using the API_KEY, which will not work for non-public tumblr's (like those that redirect to a /dashboard
link).
In order to retrieve the posts, you will need to send a fully-signed request by using all 4 OAuth params.
This will not work
list($consumerKey, $consumerSecret, $token, $secret) = [
'', // fill in these values
'',
'',
'',
];
$client = new Tumblr\API\Client($consumerKey, $consumerSecret);
$blogName = 'mel-tedchocolate.tumblr.com';
$page = 1;
$posts = $client->getBlogPosts(
$blogName,
[
'type' => 'photo', // or 'text', etc.
'limit' => 20,
'offset' => ($page - 1) * 20,
]
);
var_dump($posts);
Changing the client creation line to this should work
$client = new Tumblr\API\Client($consumerKey, $consumerSecret, $token, $secret);
from tumblr.php.
This may seem like a silly question, but you are the owner/member of the private blog in question right?
from tumblr.php.
@oligriffiths no but i also tried it with my own blog
from tumblr.php.
You won't be able to access a private blog that you are not part of.
If you're happy to supply the name of the private blog you are trying to access, we can look into it.
from tumblr.php.
@oligriffiths the blog for example is mel-tedchocolate
like i said, i also tried it with my own blog
$client = new Tumblr\API\Client($consumerKey, $consumerSecret, $token, $secret);
$client->getBlogPosts('mel-tedchocolate'); // returns 200
$client->getBlogPosts('mel-tedchocolate', ['type' => 'photo']); // returns 400
from tumblr.php.
Is that exact script returning a 400 and not 404?
If I run that script with my credentials, both return status 200 and the data.
400 suggests that the request is invalid in some way, are you using the latest version of tumblr.php and the latest matching versions of the dependencies in composer.json?
from tumblr.php.
@jasonpenny oops sorry its a typo it actualy returns 404
from tumblr.php.
@jasonpenny i invited you to my repo so you can see the full source code if you want
from tumblr.php.
Related Issues (20)
- Response to a Submission HOT 1
- followed
- Tumblr oauth not working in Laravel 6.5.2
- Encountere a error during handling Response in PHP HOT 1
- Encountered an Exception handling HOT 1
- How to check if a post is reblogged ?
- Is this package deprecated? HOT 6
- Is there a version of this package that supports NPF(Neue Post Format)?
- Missing or invalid request token. HOT 1
- Neue Post HOT 5
- compatibility issue with php8.2 HOT 1
- What file do I have to include in my php file HOT 2
- Bad Request (You may only upload one video per post.) HOT 1
- RATE LIMITING HEADERS HOT 1
- Rate limit exceeded HOT 1
- Reblog post Unauthorized ? HOT 1
- oauth 403 error ? HOT 2
- How to get video post URL HOT 3
- get list of users who liked post
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tumblr.php.